-
Notifications
You must be signed in to change notification settings - Fork 221
69 lines (58 loc) · 2.31 KB
/
release-major.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Major Release
on:
workflow_dispatch:
jobs:
release-major:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0 # Needed to do a proper push
# Update support to point to the current major version
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_RW_TOKEN }}
branch: support
# Get and save the current major version tag
# before the next major version is released
# to use it for updating dist-tag on support branch.
- name: Get previous tag
id: previous-tag
run: echo "::set-output name=tag::$(node -p 'require("./lerna.json").version')"
# Pull changes from prerelease/major into master.
# Changes will be pushed with a release commit
- name: Pull changes >> prerelease/major -> master
run: git pull origin prerelease/major
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 18.x
# Run the release job to publish the next major version to npm
- uses: Workday/canvas-kit-actions/release@v1
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
gh_rw_token: ${{ secrets.GH_RW_TOKEN }}
publish_token: ${{ secrets.NPM_CI_PUBLISH_TOKEN }}
chromatic_project_token: ${{ secrets.CHROMATIC_APP_CODE }}
version: 'major'
toRef: 'prerelease/major'
# Update prerelease/minor to point to the next major release.
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_RW_TOKEN }}
branch: prerelease/minor
# Update prerelease/major with the changes from prerelease/minor which include the major release version bump.
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_RW_TOKEN }}
branch: prerelease/major
# Update npm dist tag for support by adding a current major release version
- name: Update support dist tag
run: node utils/dist-tag.mjs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_PUBLISH_TOKEN }}
DIST_TAG: 'support'
VERSION: ${{ steps.previous-tag.outputs.tag }}