Skip to content

Commit

Permalink
🤖 try and publish the correct version number
Browse files Browse the repository at this point in the history
  • Loading branch information
H0R5E committed Apr 9, 2024
1 parent 2d4ffab commit 806e3c5
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
name: Create release
name: Create release and publish
runs-on: ubuntu-latest
outputs:
released: ${{ steps.release.outputs.released }}
Expand All @@ -27,7 +27,7 @@ jobs:
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
running-workflow-name: 'Create release'
running-workflow-name: 'Create release and publish'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
if: env.GIT_COMMIT_COMMITTER_NAME != 'github-actions'
Expand All @@ -36,30 +36,24 @@ jobs:
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.ADMIN_TOKEN }}

publish:
name: Publish the package
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.released == 'true'
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}
python-version: '3.x'
if: steps.release.outputs.released == 'true'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
if: steps.release.outputs.released == 'true'
- name: Build package
run: python -m build
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
if: steps.release.outputs.released == 'true'

0 comments on commit 806e3c5

Please sign in to comment.