From 0365add87f33688702e5ddd3e64143f6c77c91b5 Mon Sep 17 00:00:00 2001 From: Douglas Wu Date: Tue, 27 Jun 2023 00:24:13 -0400 Subject: [PATCH] add publish ci (#1) --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18e507d..9a3d949 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,3 +71,25 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + publish: + needs: build-and-test-rust + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + permissions: + pull-requests: write + contents: write + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}