Skip to content

Commit

Permalink
Add workflow conditions and change id-token to permissions (#17)
Browse files Browse the repository at this point in the history
* Add workflow conditions

* Temporary change id-token to permissions
  • Loading branch information
chiliec authored Nov 24, 2023
1 parent 902eb16 commit 3280df9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: push
jobs:
build:
name: Build distribution 📦
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -45,8 +46,6 @@ jobs:
environment:
name: pypi
url: https://pypi.org/p/viz-python-lib
permissions:
id-token: write

steps:
- name: Download all the dists
Expand All @@ -57,3 +56,6 @@ jobs:

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

jobs:
build:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit 3280df9

Please sign in to comment.