From fdb08fbd3488bcf5dd1c74922c19b28f3902fb60 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Sun, 3 Nov 2024 16:37:52 -0700 Subject: [PATCH] Added additional workflows for releasing minor and major releases, in addition to just patches so I can manually trigger them and update the Changelog dynamically. [skip ci] --- .github/workflows/release-major.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/release-minor.yml | 32 +++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/release-major.yml create mode 100644 .github/workflows/release-minor.yml diff --git a/.github/workflows/release-major.yml b/.github/workflows/release-major.yml new file mode 100644 index 0000000..eeeff47 --- /dev/null +++ b/.github/workflows/release-major.yml @@ -0,0 +1,32 @@ +# Adapted from https://github.com/joshka/github-workflows/blob/main/.github/workflows/rust-release-plz.yml +# Thanks to joshka for permission to use this template! + +name: Create major release + +permissions: + pull-requests: write + contents: write + +on: + workflow_dispatch: + +jobs: + release-plz: + # see https://release-plz.ieni.dev/docs/github + # for more information + name: Release-plz + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + args: release --bump-major + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/release-minor.yml b/.github/workflows/release-minor.yml new file mode 100644 index 0000000..64686d2 --- /dev/null +++ b/.github/workflows/release-minor.yml @@ -0,0 +1,32 @@ +# Adapted from https://github.com/joshka/github-workflows/blob/main/.github/workflows/rust-release-plz.yml +# Thanks to joshka for permission to use this template! + +name: Create minor release + +permissions: + pull-requests: write + contents: write + +on: + workflow_dispatch: + +jobs: + release-plz: + # see https://release-plz.ieni.dev/docs/github + # for more information + name: Release-plz + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + args: release --bump-minor + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}