Skip to content

Commit

Permalink
fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
anayden committed Dec 26, 2023
1 parent c7a769e commit 0d0ada6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Check out the repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -41,7 +43,8 @@ jobs:
- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
run: |
pdm bump dev
dev_version="$(echo $(pdm show --version).dev$(date +%s))"
pdm bump to "$dev_version"
- name: Install dependencies with PDM
run: |
Expand All @@ -53,17 +56,12 @@ jobs:
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/gh-action-pypi-publish@v1.8.11
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/

- name: Publish the release notes
Expand Down

0 comments on commit 0d0ada6

Please sign in to comment.