|
26 | 26 | GORELEASER_PRO_VERSION: v2.11.2 |
27 | 27 |
|
28 | 28 | jobs: |
29 | | - prepare: |
| 29 | + prev-tag: |
30 | 30 | outputs: |
31 | 31 | PREVIOUS_RELEASE_TAG: ${{ steps.prev-tag.outputs.PREVIOUS_RELEASE_TAG }} |
| 32 | + runs-on: ubuntu-latest |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 |
| 35 | + with: |
| 36 | + fetch-depth: 0 |
| 37 | + - name: Set goreleaser last tag reference in case of non-nightly release |
| 38 | + id: prev-tag |
| 39 | + if: inputs.nightly != 'true' |
| 40 | + # find previous tag by filtering out nightly tags and binary release (OCB, OpAMP) tags and then choosing the |
| 41 | + # second to last tag (last one is the current release) |
| 42 | + run: | |
| 43 | + prev_tag=$(git tag | grep -v "cmd" | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1) |
| 44 | + echo "PREVIOUS_RELEASE_TAG=$prev_tag" >> "$GITHUB_OUTPUT" |
| 45 | +
|
| 46 | + prepare: |
32 | 47 | strategy: |
33 | 48 | matrix: |
34 | 49 | GOOS: ${{ fromJSON(inputs.goos) }} |
|
80 | 95 | go-version: "~1.24" |
81 | 96 | check-latest: true |
82 | 97 |
|
83 | | - - name: Set goreleaser last tag reference in case of non-nightly release |
84 | | - id: prev-tag |
85 | | - if: inputs.nightly != 'true' |
86 | | - # find previous tag by filtering out nightly tags and binary release (OCB, OpAMP) tags and then choosing the |
87 | | - # second to last tag (last one is the current release) |
88 | | - run: | |
89 | | - prev_tag=$(git tag | grep -v "cmd" | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1) |
90 | | - echo "PREVIOUS_RELEASE_TAG=$prev_tag" >> "$GITHUB_OUTPUT" |
91 | | -
|
92 | 98 | - name: Set nightly enabled |
93 | 99 | id: nightly-check |
94 | 100 | if: inputs.nightly == 'true' |
@@ -258,7 +264,7 @@ jobs: |
258 | 264 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
259 | 265 | COSIGN_YES: true |
260 | 266 | GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
261 | | - GORELEASER_PREVIOUS_TAG: ${{ needs.prepare.outputs.PREVIOUS_RELEASE_TAG }} |
| 267 | + GORELEASER_PREVIOUS_TAG: ${{ needs.prev-tag.outputs.PREVIOUS_RELEASE_TAG }} |
262 | 268 | GORELEASER_CURRENT_TAG: ${{ github.ref_name }} |
263 | 269 |
|
264 | 270 | create-issue: |
|
0 commit comments