From 7f89bf30c552eb7e2b2102255c1c73d83de14bb2 Mon Sep 17 00:00:00 2001 From: Zihao Ye Date: Tue, 30 Jan 2024 01:02:29 +0800 Subject: [PATCH] [CI] Add scripts to automatically bump version and release wheels & add option to trigger build manually (#93) Copied from Punica project. Co-authored-by: Lequn Chen --- .github/workflows/release_please.yml | 27 +++++++++++++++++++++++++++ .github/workflows/release_wheel.yml | 1 + 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/release_please.yml diff --git a/.github/workflows/release_please.yml b/.github/workflows/release_please.yml new file mode 100644 index 00000000..3439aa9c --- /dev/null +++ b/.github/workflows/release_please.yml @@ -0,0 +1,27 @@ +name: Automatically bump version and release Python wheels +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + + wheel: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + uses: ./.github/workflows/release_wheel.yml + with: + tag_name: ${{ needs.release-please.outputs.tag_name }} + secrets: inherit diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 60fab503..9c32f7a8 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -1,6 +1,7 @@ # Adapted from https://github.com/punica-ai/punica/blob/591b59899f0a20760821785d06b331c8a2e5cb86/.github/workflows/release_wheel.yml name: Release on: + workflow_dispatch: workflow_call: inputs: tag_name: