From 052d2b8eb8833f421293472e3ad9d28695482e97 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:40:56 +0200 Subject: [PATCH] Add automatic publishing workflows Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- .github/workflows/prepare-new-release.yml | 26 ++++++++++++++++++++ .github/workflows/publish-release.yml | 29 +++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/prepare-new-release.yml create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/prepare-new-release.yml b/.github/workflows/prepare-new-release.yml new file mode 100644 index 00000000..51fa8678 --- /dev/null +++ b/.github/workflows/prepare-new-release.yml @@ -0,0 +1,26 @@ +name: Prepare new release + +permissions: + pull-requests: write + contents: write + +on: + workflow_dispatch: + +jobs: + new-release: + name: Prepare new release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 00000000..2a960745 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,29 @@ +name: Publish release + +permissions: + pull-requests: write + contents: write + +on: + push: + branches: + - main + +jobs: + publish: + name: Publish release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}