Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,50 @@ jobs:
- name: Execute Tests
run: |
docker compose build k2eg-python
docker compose up --exit-code-from k2eg-python --attach k2eg-python
docker compose up --exit-code-from k2eg-python --attach k2eg-python
- name: Clean resources
if: always()
run: |
docker compose logs
docker compose down -v --rmi all
docker compose down -v --rmi all

publish_prerelease:
runs-on: ubuntu-latest
needs:
- execute_test
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python "3.9"
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
- name: Find Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Manage Version with Pre-release Tag
run: |
echo "Creating pre-release version with RC tag"
VERSION="${{ steps.gitversion.outputs.major }}.${{ steps.gitversion.outputs.minor }}.${{ steps.gitversion.outputs.patch }}rc${{ github.run_number }}"
echo "Pre-release version: $VERSION"
sed -i "s#^version = \"0.0.0\"#version = \"$VERSION\"#" pyproject.toml
cat pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build
run: |
python -m build .
- name: Publish Pre-release to PyPI
run: |
twine upload -u ${{ secrets.TWINE_USERNAME }} -p ${{ secrets.TWINE_PASSWORD }} --verbose --skip-existing dist/*
Loading