-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PyPI trusted publishers for deploying (#354)
Also changes the deploy workflow.
- Loading branch information
1 parent
927f310
commit 5068287
Showing
2 changed files
with
13 additions
and
6 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 |
---|---|---|
@@ -1,14 +1,20 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version' | ||
required: true | ||
default: '1.2.3' | ||
|
||
jobs: | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: deploy | ||
permissions: | ||
id-token: write # For PyPI trusted publishers. | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -24,9 +30,10 @@ jobs: | |
|
||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
|
||
- uses: actions-ecosystem/action-push-tag@v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} | ||
tag: v${{ github.event.inputs.version }} | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
|
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