diff --git a/.github/workflows/main-build-and-publish.yml b/.github/workflows/main-build-and-publish.yml index 64c7b4c..da8d65c 100644 --- a/.github/workflows/main-build-and-publish.yml +++ b/.github/workflows/main-build-and-publish.yml @@ -60,6 +60,9 @@ jobs: versionFormat: python - name: Publish package to pypi + env: + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TWINE_USERNAME: __token__ run: | source venv/bin/activate python -m twine upload dist/* diff --git a/.github/workflows/other-check-quality-and-tests.yml b/.github/workflows/other-check-quality-and-tests.yml index 925cc7f..7cc5d6d 100644 --- a/.github/workflows/other-check-quality-and-tests.yml +++ b/.github/workflows/other-check-quality-and-tests.yml @@ -45,3 +45,39 @@ jobs: make nose python -m build working-directory: qless-py + + - name: Checkout tdg5/github-action-pack + uses: actions/checkout@v4 + with: + path: .github/actions/tdg5/github-action-pack + ref: v0.0.2 + repository: tdg5/github-action-pack + + - name: Increment version + uses: ./.github/actions/tdg5/github-action-pack/packages/increment-version-file-action/src + with: + authorEmail: dannyguinther@gmail.com + authorName: Danny Guinther + commitMessage: "[skip actions] Increment version for next development cycle" + repoPath: qless-py + versionFilePath: VERSION + versionFormat: python + + - name: Publish package to pypi + env: + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + TWINE_USERNAME: __token__ + run: | + source venv/bin/activate + python -m twine upload dist/* + working-directory: qless-py + + # Add the tag after publishing the package so it is more likely that we + # end up with a package without a tag than a tag without a package. + - name: Create and push tag for published version + run: | + VERSION="$(git show HEAD~1:VERSION)" + TAG_NAME="v${VERSION}" + git tag "$TAG_NAME" HEAD~1 + git push origin "$TAG_NAME" + working-directory: qless-py diff --git a/VERSION b/VERSION index 7b0320a..fef82ac 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.0a9 \ No newline at end of file +0.12.0a6