Updated ci
This commit is contained in:
@@ -8,12 +8,18 @@ on:
|
||||
description: 'Suffix for version (z.B. "dev", "alpha", "beta")'
|
||||
required: false
|
||||
type: string
|
||||
working_directory:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [ runner ]
|
||||
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working_directory }}
|
||||
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: https://github.com/actions/checkout@v3
|
||||
@@ -27,20 +33,25 @@ jobs:
|
||||
|
||||
- name: Set version
|
||||
run: |
|
||||
VERSION_SUFFIX="${{ inputs.version_suffix }}"
|
||||
if [ -n "$VERSION_SUFFIX" ]; then
|
||||
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml
|
||||
else
|
||||
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml
|
||||
fi
|
||||
sed -i -E "s/^version = \".*\"/version = \"$(cat /workspace/sh-edraft.de/cpl/version.txt)\"/" pyproject.toml
|
||||
echo "Set version to $(cat /workspace/sh-edraft.de/cpl/version.txt)"
|
||||
cat pyproject.toml
|
||||
|
||||
- name: Set pip conf
|
||||
run: |
|
||||
cat > .pip.conf <<'EOF'
|
||||
[global]
|
||||
extra-index-url = https://git.sh-edraft.de/api/packages/sh-edraft.de/pypi/simple/
|
||||
EOF
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
export PIP_CONFIG_FILE=".pip.conf"
|
||||
pip install build
|
||||
|
||||
- name: Build Package
|
||||
run: |
|
||||
python -m build --sdist --wheel --outdir dist
|
||||
python -m build --outdir dist
|
||||
|
||||
- name: Login to registry git.sh-edraft.de
|
||||
uses: https://github.com/docker/login-action@v1
|
||||
|
||||
Reference in New Issue
Block a user