aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-05-17 22:10:34 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2023-05-17 22:10:34 +0300
commit1f94bb1fde20c3db60370e608c4ce8d25b19b0c9 (patch)
treebbe9ee27194c02e719199f0575c4cb30a4cdc6a0
parentdrop support for py3.9 (diff)
downloadsnakeoil-1f94bb1fde20c3db60370e608c4ce8d25b19b0c9.tar.gz
snakeoil-1f94bb1fde20c3db60370e608c4ce8d25b19b0c9.tar.bz2
snakeoil-1f94bb1fde20c3db60370e608c4ce8d25b19b0c9.zip
ci: use new PyPI OIDC publish
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--.github/workflows/release.yml23
1 files changed, 10 insertions, 13 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 00120669..8b246c22 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -8,6 +8,13 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
+ environment: release
+
+ permissions:
+ id-token: write # Used to authenticate to PyPI via OIDC
+
+ contents: write # Used to authenticate github release publish
+
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -48,20 +55,9 @@ jobs:
name: results
path: dist/*
- - name: Install twine and check files
- run: |
- pip install twine wheel-inspect
- twine check dist/*
- wheel2json dist/*.whl
-
- - name: Upload to PyPI
- env:
- TWINE_USERNAME: __token__
- TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- # only upload files for tagged releases
+ - name: publish
+ uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
- run: |
- twine upload dist/*
- name: Create GitHub release
uses: softprops/action-gh-release@v1
@@ -69,3 +65,4 @@ jobs:
with:
files: dist/*.tar.gz
fail_on_unmatched_files: true
+ draft: true