Skip to content

Commit 851085d

Browse files
authored
Add next major to release workflow (#1909)
* Add next major to release workflow * Update release_candidate script * Ignore next major branches in canary workflow
1 parent 8384b22 commit 851085d

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@ on:
44
push:
55
branches:
66
- main
7-
- 'next/**'
7+
- next-major
88

99
jobs:
10-
release:
11-
name: Release
10+
release-main:
11+
if: github.ref_name == 'main'
12+
name: Main
1213
uses: primer/.github/.github/workflows/release.yml@main
1314
secrets:
1415
gh_token: ${{ secrets.GPR_AUTH_TOKEN_SHARED }}
1516
npm_token: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
17+
18+
release-next-major:
19+
if: github.ref_name == 'next-major'
20+
name: Next major
21+
uses: primer/.github/.github/workflows/release.yml@main
22+
with:
23+
title: Release tracking (next major)
24+
secrets:
25+
gh_token: ${{ secrets.GPR_AUTH_TOKEN_SHARED }}
26+
npm_token: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}

.github/workflows/release_canary.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ on:
33
push:
44
branches-ignore:
55
- 'main'
6-
- 'changeset-release/main'
6+
- 'next-major'
7+
- 'changeset-release/**'
78

89
jobs:
910
release-canary:

.github/workflows/release_candidate.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@ on:
44
push:
55
branches:
66
- 'changeset-release/main'
7+
- 'changeset-release/next-major'
78

89
jobs:
910
release-candidate:
10-
name: Candidate
11+
if: github.ref_name == 'changeset-release/main'
12+
name: Candidate (@next)
1113
uses: primer/.github/.github/workflows/release_candidate.yml@main
1214
secrets:
1315
gh_token: ${{ secrets.GITHUB_TOKEN }}
1416
npm_token: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
17+
18+
release-candidate-next-major:
19+
if: github.ref_name == 'changeset-release/next-major'
20+
name: Candidate (@next-major)
21+
uses: primer/.github/.github/workflows/release_candidate.yml@main
22+
with:
23+
tag: next-major
24+
secrets:
25+
gh_token: ${{ secrets.GITHUB_TOKEN }}
26+
npm_token: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}

0 commit comments

Comments
 (0)