-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 try and publish the correct version number
- Loading branch information
Showing
1 changed file
with
10 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -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' | ||
|
@@ -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' |