Updated ci
This commit is contained in:
@@ -15,15 +15,13 @@ jobs:
|
|||||||
core:
|
core:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
uses: ./.gitea/workflows/package.yaml
|
uses: ./.gitea/workflows/package.yaml
|
||||||
defaults:
|
with:
|
||||||
run:
|
working_directory: src/cpl_core
|
||||||
working-directory: src/cpl_core
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
query:
|
query:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
uses: ./.gitea/workflows/package.yaml
|
uses: ./.gitea/workflows/package.yaml
|
||||||
defaults:
|
with:
|
||||||
run:
|
working_directory: src/cpl_query
|
||||||
working-directory: src/cpl_query
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@@ -8,12 +8,17 @@ on:
|
|||||||
description: 'Suffix for version (z.B. "dev", "alpha", "beta")'
|
description: 'Suffix for version (z.B. "dev", "alpha", "beta")'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
working_directory:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: [ runner ]
|
runs-on: [ runner ]
|
||||||
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ inputs.working_directory }}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Repository
|
- name: Clone Repository
|
||||||
uses: https://github.com/actions/checkout@v3
|
uses: https://github.com/actions/checkout@v3
|
||||||
@@ -29,8 +34,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
VERSION_SUFFIX="${{ inputs.version_suffix }}"
|
VERSION_SUFFIX="${{ inputs.version_suffix }}"
|
||||||
if [ -n "$VERSION_SUFFIX" ]; then
|
if [ -n "$VERSION_SUFFIX" ]; then
|
||||||
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml
|
if [[ "$VERSION_SUFFIX" == "dev" ]]; then
|
||||||
|
echo "Using dev versioning"
|
||||||
|
BASE_VERSION=$(cat version.txt | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+\.)([0-9]+)/\1/')
|
||||||
|
DEV_NUMBER=$(echo "$VERSION_SUFFIX" | sed -E 's/dev([0-9]*)/\1/')
|
||||||
|
DEV_NUMBER=${DEV_NUMBER:-1}
|
||||||
|
sed -i -E "s/^version = \".*\"/version = \"${BASE_VERSION}dev${DEV_NUMBER}\"/" pyproject.toml
|
||||||
else
|
else
|
||||||
|
echo "Using suffix versioning: $VERSION_SUFFIX"
|
||||||
|
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)-$VERSION_SUFFIX\"/" pyproject.toml
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Using release versioning"
|
||||||
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml
|
sed -i -E "s/^version = \".*\"/version = \"$(cat version.txt)\"/" pyproject.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -40,7 +55,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Package
|
- name: Build Package
|
||||||
run: |
|
run: |
|
||||||
python -m build --sdist --wheel --outdir dist
|
python -m build --outdir dist
|
||||||
|
|
||||||
- name: Login to registry git.sh-edraft.de
|
- name: Login to registry git.sh-edraft.de
|
||||||
uses: https://github.com/docker/login-action@v1
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user