-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: automatic releases and PyPi upload
- Loading branch information
1 parent
c175896
commit 426d5c9
Showing
2 changed files
with
60 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Post-process | ||
|
||
on: | ||
workflow_run: | ||
types: | ||
- completed | ||
workflows: | ||
# List all required workflow names here. | ||
- 'testing' | ||
|
||
jobs: | ||
# https://github.com/marketplace/actions/tag-release-on-push-action | ||
auto-gen-release: | ||
name: Tag/Release on merge of labeled PRs | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- # It is often a desired behavior to merge only when a workflow execution | ||
# succeeds. This can be changed as needed. | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
uses: rymndhng/[email protected] | ||
with: | ||
# loonly release when PRs with release:major/minor/patch labels are merged | ||
bump_version_scheme: norelease | ||
use_github_release_notes: true |
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,34 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: publish | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools setuptools_scm wheel tox | ||
- name: Build packages for distribution | ||
run: | | ||
tox -e build | ||
- name: Upload to PyPi | ||
uses: pypa/[email protected] | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing |