aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-04-22 20:03:46 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2023-04-22 20:03:46 +0300
commitcb9b372c0657cbdd7fe6c466fd385910b85d916f (patch)
tree9cd7907a44f0ca0e15e119db79c4d5521cdd2182 /.github
parentbugs: support piping package list from stdin (diff)
downloadpkgdev-cb9b372c0657cbdd7fe6c466fd385910b85d916f.tar.gz
pkgdev-cb9b372c0657cbdd7fe6c466fd385910b85d916f.tar.bz2
pkgdev-cb9b372c0657cbdd7fe6c466fd385910b85d916f.zip
ci: use new PyPI OIDC publish
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml24
1 files changed, 14 insertions, 10 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f24e520..642708f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,6 +9,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@v2
@@ -42,18 +49,14 @@ jobs:
sha512sum dist/*
tar -ztf dist/*.tar.gz | sort
- - name: Install twine and check files
- run: |
- pip install twine wheel-inspect
- twine check dist/*
- wheel2json dist/*.whl
+ - uses: actions/upload-artifact@v3
+ with:
+ name: results
+ path: dist/*
- - name: Upload to PyPI
- env:
- TWINE_USERNAME: __token__
- TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+ - 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
@@ -61,3 +64,4 @@ jobs:
with:
files: dist/*.tar.gz
fail_on_unmatched_files: true
+ draft: true