Skip to content

Commit

Permalink
Upgrade to a release workflow compatible with pypi trusted publishing (
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe authored Dec 14, 2023
1 parent ead50b1 commit 578050a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@ on:
types: [published]

jobs:
build-and-publish:
uses: less-action/reusables/.github/workflows/python-publish.yaml@v8
secrets:
pypi_api_token: ${{ secrets.PYPI_API_TOKEN }}
release:
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/bankid-sdk
permissions:
id-token: write
steps:
- name: Setup python to build package
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build
run: python -m pip install build
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build package
run: pyproject-build -s -w . -o dist
- name: Publish to PyPI
uses: pypa/[email protected]

0 comments on commit 578050a

Please sign in to comment.