Skip to content

Commit 83262cd

Browse files
committed
Fix publisher workflow
1 parent 0aa2236 commit 83262cd

3 files changed

Lines changed: 9 additions & 30 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,11 @@ jobs:
1616
- uses: actions/setup-python@v4
1717
with:
1818
python-version: "3.x"
19-
20-
- name: deps
21-
run: python -m pip install -U poetry
22-
23-
- name: build
24-
run: poetry build
25-
26-
- name: mint API token
27-
id: mint-token
28-
run: |
29-
# retrieve the ambient OIDC token
30-
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
31-
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi")
32-
oidc_token=$(jq '.value' <<< "${resp}")
33-
34-
# exchange the OIDC token for an API token
35-
resp=$(curl -X POST https://pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}")
36-
api_token=$(jq '.token' <<< "${resp}")
37-
38-
# mask the newly minted API token, so that we don't accidentally leak it
39-
echo "::add-mask::${api_token}"
40-
41-
# see the next step in the workflow for an example of using this step output
42-
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
43-
44-
- name: publish
19+
- name: Install dependencies
4520
run: |
46-
poetry config pypi-token.pypi ${{ steps.mint-token.outputs.api-token }}
47-
poetry publish
21+
python -m pip install --upgrade pip
22+
pip install poetry
23+
- name: Configure poetry
24+
run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
25+
- name: Publish package
26+
run: poetry publish --build

flake8_github/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.3a0"
1+
__version__ = "1.0.0"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "flake8-github"
3-
version = "1.0.3a0"
3+
version = "1.0.0"
44
description = "Flake8 formatter for GitHub Actions"
55
authors = ["Max Kryvych <me@kryvych.cc>"]
66
license = "MIT License"

0 commit comments

Comments
 (0)