diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9097444..cc5bc4f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,15 +1,27 @@ +name: Release-plz + +permissions: + pull-requests: write + contents: write + on: push: - tags: - - '*' + branches: + - main jobs: - publish: + release-plz: + name: Release-plz runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Publish to crates.io - run: | - cargo publish - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + - 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 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}