-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
8 additions
and
222 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 |
---|---|---|
@@ -1,84 +1,13 @@ | ||
name: Build, Update CHANGELOG, Release, Upload to PyPI | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
permissions: | ||
contents: write | ||
jobs: | ||
build-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
- uses: hynek/build-and-inspect-python-package@v2 | ||
|
||
update-changelog: | ||
needs: [build-package] | ||
if: "!contains(github.ref, 'rc')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Run the changelog script for full release (no rc) | ||
run: python .github/workflows/update-changelog.py "${{ github.ref_name }}" | ||
- '*' | ||
|
||
- name: Automatically commit changes full release (no rc) | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: update changelog | ||
branch: pypi-build # FIXME: change to main | ||
|
||
github-pre-release: | ||
needs: [build-package] | ||
if: contains(github.ref, 'rc') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create pre-release for rc versions | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
prerelease: true | ||
generate_release_notes: true | ||
|
||
github-release: | ||
needs: [build-package, update-changelog] | ||
if: "!contains(github.ref, 'rc')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: pypi-build # FIXME: change to main | ||
- name: Generate release notes for full release for full release | ||
run: python .github/workflows/get-latest-changelog.py "${{ github.ref_name }}" | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: CHANGELOG.txt | ||
draft: true | ||
|
||
pypi-publish: | ||
needs: [build-package] | ||
environment: | ||
name: testpypi # FIXME: change to pypi | ||
url: https://test/pypi.org/p/cifkit # FIXME: get the PyPI URL | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ # FIXME: remove test. | ||
verbose: true | ||
jobs: | ||
release: | ||
uses: bobleesj/release-scripts/.github/workflows/_build-wheel-release-publish.yml@{{ VERSION/v0 }} | ||
with: | ||
project: cifkit |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.