Skip to content

Commit 34689a0

Browse files
committed
updating the GH Action
1 parent 7957943 commit 34689a0

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Update Version, Test, Publish to PyPI, and Upload Release Artifacts
2-
32
on:
43
release:
54
types: [created]
6-
75
jobs:
86
build-test-publish-upload:
97
runs-on: ubuntu-latest
@@ -40,22 +38,19 @@ jobs:
4038
# retrieve the ambient OIDC token
4139
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
4240
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi")
43-
oidc_token=$(jq -r '.value' <<< "${resp}")
44-
41+
oidctoken=$(jq -r '.value' <<< "${resp}")
4542
# exchange the OIDC token for an API token
46-
resp=$(curl -X POST https://pypi.org/_/oidc/mint-token -d "{\"token\": \"${oidc_token}\"}")
43+
resp=$(curl -X POST https://pypi.org//oidc/mint-token -d "{\"token\": \"${oidc_token}\"}")
4744
api_token=$(jq -r '.token' <<< "${resp}")
48-
4945
# mask the newly minted API token, so that we don't accidentally leak it
5046
echo "::add-mask::${api_token}"
51-
5247
# see the next step in the workflow for an example of using this step output
5348
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
5449
- name: Publish to PyPI
5550
env:
5651
PYPI_API_TOKEN: ${{ steps.mint-token.outputs.api-token }}
5752
run: |
58-
hatch publish -u __token__ -a $PYPI_API_TOKEN
53+
hatch publish -u token -a $PYPI_API_TOKEN
5954
- name: Upload Release Asset
6055
uses: ncipollo/release-action@v1
6156
with:
@@ -71,18 +66,15 @@ jobs:
7166
PACKAGE_NAME="mesa_frames"
7267
CURRENT_VERSION=$(hatch version)
7368
pip install $PACKAGE_NAME==$CURRENT_VERSION
74-
python -c "import mesa_frames; print(mesa_frames.__version__)"
75-
69+
python -c "import mesa_frames; print(mesa_frames.version)"
7670
# Bump to next development version
7771
hatch version patch
7872
hatch version dev
79-
8073
# Get the new version
8174
NEW_VERSION=$(hatch version)
82-
8375
# Commit and push the version bump
8476
git config user.name github-actions
8577
git config user.email github-actions@github.com
86-
git add mesa-frames/__init__.py
78+
git add mesa-frames/init.py
8779
git commit -m "Bump version to $NEW_VERSION [skip ci]"
8880
git push

0 commit comments

Comments
 (0)