Skip to content

Commit

Permalink
Merge pull request #16 from nasa/harmony-1756
Browse files Browse the repository at this point in the history
Harmony 1756 - Use trusted publisher for publishing to PyPi
  • Loading branch information
indiejames authored May 3, 2024
2 parents 4dec8dc + 777099b commit 1d34551
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,13 +16,11 @@ 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: |
make install
VERSION=$(echo "${VERSION_TAG}" | cut -c2-) make build
make publish
# Setup git
# https://api.github.com/users/github-actions%5Bbot%5D
Expand All @@ -37,3 +35,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 1d34551

Please sign in to comment.