Skip to content

Commit 016d499

Browse files
MattTheCuberjourdain
authored andcommitted
ci: fix release job
1 parent acf71f8 commit 016d499

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/test_and_release.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,19 @@ jobs:
8181
npm run build
8282
8383
release:
84-
needs: [
85-
pre-commit,
86-
pytest,
87-
test-npm-build,
88-
]
84+
needs: [pre-commit, pytest, test-npm-build]
8985
runs-on: ubuntu-latest
9086
if: github.event_name == 'push'
87+
environment:
88+
name: pypi
89+
url: https://pypi.org/p/trame-tauri
90+
permissions:
91+
id-token: write # IMPORTANT: mandatory for trusted publishing
92+
contents: write # IMPORTANT: mandatory for making GitHub Releases
9193

9294
steps:
9395
- name: Checkout
94-
uses: actions/checkout@v2
96+
uses: actions/checkout@v5
9597
with:
9698
fetch-depth: 0
9799

@@ -105,10 +107,13 @@ jobs:
105107
cd vue-components
106108
npm i
107109
npm run build
108-
110+
109111
- name: Python Semantic Release
110-
uses: relekang/[email protected]
112+
id: release
113+
uses: relekang/[email protected]
111114
with:
112115
github_token: ${{ secrets.GITHUB_TOKEN }}
113-
repository_username: __token__
114-
repository_password: ${{ secrets.PYPI_API_TOKEN }}
116+
117+
- name: Publish package distributions to PyPI
118+
if: steps.release.outputs.released == 'true'
119+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)