diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2023-05-17 22:10:34 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-05-17 22:10:34 +0300 |
commit | 1f94bb1fde20c3db60370e608c4ce8d25b19b0c9 (patch) | |
tree | bbe9ee27194c02e719199f0575c4cb30a4cdc6a0 | |
parent | drop support for py3.9 (diff) | |
download | snakeoil-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.yml | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0012066..8b246c2 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 |