Skip to content

Commit

Permalink
Merge pull request #41 from nasa/harmony-1756
Browse files Browse the repository at this point in the history
Harmony 1756 - Use trusted publisher token to publish to PyPi
  • Loading branch information
indiejames authored May 3, 2024
2 parents 63fb8fd + bc31376 commit d3fb928
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ jobs:
python-version: '3.8'
- shell: bash
env:
REPO_PASS: ${{ secrets.PYPI }}
VERSION_TAG: ${{ github.event.release.tag_name }}
BRANCH: ${{ github.event.release.target_commitish }}
run: |
VERSION=$(echo "${VERSION_TAG}" | cut -c2-) make build
make publish
# Setup git
# https://api.github.com/users/github-actions%5Bbot%5D
Expand All @@ -36,3 +34,25 @@ jobs:
git tag --force "${VERSION_TAG}"
git push --force origin "${VERSION_TAG}"
- name: upload dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- build
permissions:
id-token: write

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit d3fb928

Please sign in to comment.