Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to a release workflow compatible with pypi trusted publishing #4

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/gh-action-pypi-publish@v1.8.11
Loading