-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflows to prep for release.
- Loading branch information
Showing
4 changed files
with
74 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
uses: ./.github/workflows/tests.yaml | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-dev | ||
|
||
- name: Get release version | ||
id: release-version | ||
run: echo "RELEASE_VERSION=v$(poetry version --short)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build package | ||
run: poetry build | ||
|
||
- name: Upload the files to the release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: ${{ github.workspace }}/dist/* | ||
tag: ${{ steps.release-version.outputs.RELEASE_VERSION }} | ||
commit: ${{ github.sha }} | ||
omitBody: true | ||
|
||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters