this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at tangled-ci 92 lines 3.2 kB view raw
1name: Release-plz 2 3on: 4 push: 5 branches: 6 - main 7 workflow_dispatch: 8 9jobs: 10 release-plz-release: 11 name: Release-plz release 12 runs-on: ubuntu-latest 13 if: github.repository_owner == 'arcuru' && (github.event_name == 'push' || github.ref == 'refs/heads/main') 14 environment: publish 15 permissions: 16 actions: write 17 contents: write 18 id-token: write 19 steps: 20 - name: Checkout repository 21 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 22 with: 23 fetch-depth: 0 24 - name: Install Rust toolchain 25 uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master 26 with: 27 toolchain: stable 28 - name: Rust Cache 29 uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 30 31 - name: Authenticate with crates.io 32 uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe # v1.0.4 33 id: cratesio-auth 34 35 - name: Run release-plz 36 id: release-plz 37 uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5.128 38 with: 39 command: release 40 config: .config/release-plz.toml 41 env: 42 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 CARGO_REGISTRY_TOKEN: ${{ steps.cratesio-auth.outputs.token }} 44 45 - name: Trigger publish workflow 46 if: steps.release-plz.outputs.releases_created == 'true' 47 env: 48 RELEASES: ${{ steps.release-plz.outputs.releases }} 49 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 run: | 51 TAG=$(echo "$RELEASES" | jq -r '.[0].tag_name') 52 gh workflow run publish.yml -f tag_name="$TAG" 53 54 release-plz-pr: 55 name: Release-plz PR 56 runs-on: ubuntu-latest 57 if: ${{ github.repository_owner == 'arcuru' }} 58 permissions: 59 contents: write 60 pull-requests: write 61 concurrency: 62 group: release-plz-${{ github.ref }} 63 cancel-in-progress: false 64 steps: 65 - name: Checkout repository 66 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 67 with: 68 fetch-depth: 0 69 - name: Install Rust toolchain 70 uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master 71 with: 72 toolchain: stable 73 - name: Rust Cache 74 uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 75 76 - name: Check if release PR exists 77 id: check-pr 78 if: github.event_name == 'push' 79 run: | 80 PR_EXISTS=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --json number,headRefName --jq '[.[] | select(.headRefName | startswith("release-plz"))] | length') 81 echo "exists=$PR_EXISTS" >> "$GITHUB_OUTPUT" 82 env: 83 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 84 85 - name: Run release-plz 86 if: github.event_name == 'workflow_dispatch' || steps.check-pr.outputs.exists != '0' 87 uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11 # v0.5.128 88 with: 89 command: release-pr 90 config: .config/release-plz.toml 91 env: 92 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}