summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2023-04-25 14:21:11 -0600
committerGitHub <noreply@github.com>2023-04-25 13:21:11 -0700
commit2c23bf6015741ee59278f0e03bdaea6045740821 (patch)
treecbd60ff2ea75af8664f642b67e43567640a342b4
parentaf43a28c46e32f9edaba7bca0edf2fc6a29610de (diff)
downloadtox-git-2c23bf6015741ee59278f0e03bdaea6045740821.tar.gz
Use PyPI Trusted Publishers (#2994)
-rw-r--r--.github/workflows/check.yml24
-rw-r--r--.github/workflows/release.yml24
2 files changed, 25 insertions, 23 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 9c11a536..787b01a6 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -1,6 +1,7 @@
name: check
on:
push:
+ tags-ignore: ["**"]
pull_request:
schedule:
- cron: "0 8 * * *"
@@ -79,26 +80,3 @@ jobs:
run: tox r -e ${{ matrix.tox_env }}
env:
UPGRADE_ADVISORY: "yes"
-
- publish:
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- needs: [check, test]
- runs-on: ubuntu-22.04
- steps:
- - name: Setup python to build package
- uses: actions/setup-python@v4
- with:
- python-version: "3.11"
- - name: Install build
- run: python -m pip install build
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Build package
- run: pyproject-build -s -w . -o dist
- - name: Publish to PyPI
- uses: pypa/gh-action-pypi-publish@v1.8.5
- with:
- skip_existing: true
- user: __token__
- password: ${{ secrets.pypi_password }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..de4e15c9
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,24 @@
+name: Release to PyPI
+on:
+ push:
+ tags: ["*"]
+
+jobs:
+ release:
+ runs-on: ubuntu-22.04
+ permissions:
+ id-token: write
+ steps:
+ - name: Setup python to build package
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+ - name: Install build
+ run: python -m pip install build
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Build package
+ run: pyproject-build -s -w . -o dist
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@v1.8.5