Skip to content

Commit

Permalink
Merge pull request #96 from esc/backport_89
Browse files Browse the repository at this point in the history
Merge pull request #89 from esc/reroll_54
  • Loading branch information
esc authored Aug 9, 2023
2 parents 5a23ba7 + fb59530 commit 5add1cb
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Miniconda
Expand Down

0 comments on commit 5add1cb

Please sign in to comment.