|
5 | 5 | branches:
|
6 | 6 | - master
|
7 | 7 |
|
| 8 | +env: |
| 9 | + RELEASE_PLZ_VERSION: "0.3.130" |
| 10 | + |
8 | 11 | jobs:
|
9 | 12 | release-plz-pr:
|
10 | 13 | permissions:
|
@@ -43,11 +46,32 @@ jobs:
|
43 | 46 | fetch-depth: 0
|
44 | 47 | - name: Install Rust toolchain
|
45 | 48 | uses: dtolnay/rust-toolchain@stable
|
| 49 | + - name: Install binaries |
| 50 | + uses: taiki-e/install-action@v2 |
| 51 | + with: |
| 52 | + tool: release-plz@${{env.RELEASE_PLZ_VERSION}} |
46 | 53 | - name: Run release-plz
|
47 | 54 | id: release-plz
|
48 |
| - uses: release-plz/[email protected] |
49 |
| - with: |
50 |
| - command: release --dry-run |
| 55 | + shell: bash |
| 56 | + # Modified from https://github.com/release-plz/action/blob/main/action.yml |
| 57 | + run: | |
| 58 | + release_output=$(release-plz release\ |
| 59 | + --git-token "${GITHUB_TOKEN}"\ |
| 60 | + --dry-run\ |
| 61 | + -o json) |
| 62 | + echo "release_pr_output: $release_pr_output" |
| 63 | + prs=$(echo $release_pr_output | jq -c .prs) |
| 64 | + echo "prs=$prs" >> "$GITHUB_OUTPUT" |
| 65 | + prs_length=$(echo "$prs" | jq 'length') |
| 66 | + if [ "$prs_length" != "0" ]; then |
| 67 | + prs_created=true |
| 68 | + first_pr=$(echo $prs | jq -c .[0]) |
| 69 | + else |
| 70 | + prs_created=false |
| 71 | + first_pr="{}" |
| 72 | + fi |
| 73 | + echo "pr=$first_pr" >> "$GITHUB_OUTPUT" |
| 74 | + echo "prs_created=$prs_created" >> "$GITHUB_OUTPUT" |
51 | 75 | env:
|
52 | 76 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
53 | 77 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
79 | 103 | uses: release-plz/[email protected]
|
80 | 104 | with:
|
81 | 105 | command: release
|
| 106 | + version: ${{env.RELEASE_PLZ_VERSION}} |
82 | 107 | env:
|
83 | 108 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
84 | 109 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
0 commit comments