Skip to content

Commit 3280df9

Browse files
authored
Add workflow conditions and change id-token to permissions (#17)
* Add workflow conditions * Temporary change id-token to permissions
1 parent 902eb16 commit 3280df9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/pypi.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: push
55
jobs:
66
build:
77
name: Build distribution 📦
8+
if: startsWith(github.ref, 'refs/tags/')
89
runs-on: ubuntu-latest
910
strategy:
1011
matrix:
@@ -45,8 +46,6 @@ jobs:
4546
environment:
4647
name: pypi
4748
url: https://pypi.org/p/viz-python-lib
48-
permissions:
49-
id-token: write
5049

5150
steps:
5251
- name: Download all the dists
@@ -57,3 +56,6 @@ jobs:
5756

5857
- name: Publish distribution 📦 to PyPI
5958
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
username: __token__
61+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
78
runs-on: ubuntu-latest
89
strategy:
910
matrix:

0 commit comments

Comments
 (0)