-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from esc/backport_89
Merge pull request #89 from esc/reroll_54
- Loading branch information
Showing
2 changed files
with
84 additions
and
1 deletion.
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,83 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
# First we are going to create a task that generates a new release in GitHub | ||
# as a draft. All the wheels will end up being uploaded here at the end. | ||
create-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.create-gh-release.outputs.computed-prefix }}${{ steps.create-gh-release.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: create-gh-release | ||
uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
draft: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-wheels: | ||
# Build binary wheels for the platforms we care about using cibuildwheel. | ||
name: Build wheels | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Build wheels | ||
run: "pip wheel -w wheelhouse ." | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/numba_rvsdg-*.whl | ||
|
||
build-sdist: | ||
# Build a source package. This is actually easy. | ||
name: Make SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
upload-all: | ||
needs: [build-wheels, build-sdist, create-release] | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: run cargo-dist manifest | ||
run: | | ||
gh release upload ${{ needs.create-release.outputs.tag }} dist/* | ||
# Mark the Github Release™️ as a non-draft now that everything has succeeded! | ||
publish-release: | ||
needs: [create-release, upload-all] | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: mark release as non-draft | ||
run: | | ||
gh release edit ${{ needs.create-release.outputs.tag }} --draft=false |
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