Skip to content

Commit

Permalink
Updated for Trusted Publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
miballe committed Sep 10, 2024
1 parent 9c7849b commit 6c8bbe5
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/dev_test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'dev'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10.9'

Expand All @@ -50,17 +51,19 @@ jobs:
run: pytest test/ >> $GITHUB_STEP_SUMMARY

build:
name: Build and Publish
name: Build
runs-on: ubuntu-latest
needs: [test]
permissions:
id-token: write
steps:
- name : Checkout code
uses : actions/checkout@v4
with:
ref: 'dev'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10.9'

Expand All @@ -73,7 +76,14 @@ jobs:
python setup.py bdist_wheel >> $GITHUB_STEP_SUMMARY
python setup.py sdist >> $GITHUB_STEP_SUMMARY
- name: Upload Artifact
publish:
name: Publish
runs-on: ubuntu-latest
needs: [build]
permissions:
id-token: write
steps:
- name: GitHub Artifact Upload
uses: actions/upload-artifact@v4
with:
name: Wheel_library
Expand All @@ -82,7 +92,4 @@ jobs:
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true

0 comments on commit 6c8bbe5

Please sign in to comment.