|
5 | 5 | branches: |
6 | 6 | - main |
7 | 7 | - "release/2.[0-9]+" |
8 | | - release: |
9 | | - types: [published] |
10 | 8 |
|
11 | 9 | permissions: |
12 | 10 | contents: read |
|
29 | 27 |
|
30 | 28 | - name: Detect next release version |
31 | 29 | id: version |
32 | | - # Find the highest release/2.X branch (exact pattern, no suffixes like |
33 | | - # release/2.31_hotfix) and derive the next minor version for the release |
34 | | - # currently in development on main. |
| 30 | + # Find the highest release/2.X branch (exact pattern, no suffixes |
| 31 | + # like release/2.31_hotfix) and derive the next minor version for |
| 32 | + # the release currently in development on main. |
35 | 33 | run: | |
36 | 34 | LATEST_MINOR=$(git branch -r | grep -E '^\s*origin/release/2\.[0-9]+$' | \ |
37 | 35 | sed 's/.*release\/2\.//' | sort -n | tail -1) |
|
40 | 38 | echo "skip=true" >> "$GITHUB_OUTPUT" |
41 | 39 | exit 0 |
42 | 40 | fi |
43 | | - echo "version=2.$((LATEST_MINOR + 1))" >> "$GITHUB_OUTPUT" |
| 41 | + NEXT="2.$((LATEST_MINOR + 1))" |
| 42 | + echo "version=$NEXT" >> "$GITHUB_OUTPUT" |
44 | 43 | echo "skip=false" >> "$GITHUB_OUTPUT" |
| 44 | + echo "Detected next release: $NEXT" |
45 | 45 |
|
46 | 46 | - name: Sync issues |
47 | 47 | id: sync |
|
51 | 51 | access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
52 | 52 | command: sync |
53 | 53 | version: ${{ steps.version.outputs.version }} |
| 54 | + name: ${{ steps.version.outputs.version }} |
54 | 55 | timeout: 300 |
55 | 56 |
|
56 | 57 | sync-release-branch: |
|
76 | 77 | access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
77 | 78 | command: sync |
78 | 79 | version: ${{ steps.version.outputs.version }} |
| 80 | + name: ${{ steps.version.outputs.version }} |
79 | 81 | timeout: 300 |
80 | 82 |
|
81 | 83 | code-freeze: |
@@ -106,38 +108,3 @@ jobs: |
106 | 108 | version: ${{ steps.version.outputs.version }} |
107 | 109 | timeout: 300 |
108 | 110 |
|
109 | | - complete: |
110 | | - name: Complete Linear release |
111 | | - if: github.event_name == 'release' |
112 | | - runs-on: ubuntu-latest |
113 | | - steps: |
114 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
115 | | - with: |
116 | | - persist-credentials: false |
117 | | - |
118 | | - - name: Extract release version |
119 | | - id: version |
120 | | - # Strip "v" prefix and patch: "v2.31.0" -> "2.31". Also detect whether |
121 | | - # this is a minor release (v*.*.0) — patch releases (v2.31.1, v2.31.2, |
122 | | - # ...) are grouped into the same Linear release and must not re-complete |
123 | | - # it after it has already shipped. |
124 | | - run: | |
125 | | - VERSION=$(echo "$TAG" | sed 's/^v//' | cut -d. -f1,2) |
126 | | - echo "version=$VERSION" >> "$GITHUB_OUTPUT" |
127 | | - if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.0$ ]]; then |
128 | | - echo "is_minor=true" >> "$GITHUB_OUTPUT" |
129 | | - else |
130 | | - echo "is_minor=false" >> "$GITHUB_OUTPUT" |
131 | | - fi |
132 | | - env: |
133 | | - TAG: ${{ github.event.release.tag_name }} |
134 | | - |
135 | | - - name: Complete release |
136 | | - id: complete |
137 | | - if: steps.version.outputs.is_minor == 'true' |
138 | | - uses: linear/linear-release-action@755d50b5adb7dd42b976ee9334952745d62ceb2d # v0.6.0 |
139 | | - with: |
140 | | - access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
141 | | - command: complete |
142 | | - version: ${{ steps.version.outputs.version }} |
143 | | - timeout: 300 |
0 commit comments