File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow is used on the rare occassion we need to manually cut a release.
2
+ # It can be triggered via the Github UI or the Github API.
3
+
4
+ name : Manual publish to Github Releases and NPM
5
+
6
+ on :
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ release :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ with :
15
+ # We need to fetch all tags and branches
16
+ fetch-depth : 0
17
+
18
+ - name : Verify head of master hasn't changed
19
+ run : |
20
+ # We ensure that the latest commit on master is still the one we expected when
21
+ # we started the release job, otherwise we exit
22
+ if [ "$GITHUB_SHA" != "$(git rev-parse --verify HEAD)" ]; then
23
+ echo "ERROR: The commit SHA at the HEAD of master has changed"
24
+ echo "Expected: $GITHUB_SHA"
25
+ echo "Actual: $(git rev-parse --verify HEAD)"
26
+ exit 1;
27
+ fi
28
+
29
+ - name : Get yarn cache directory path
30
+ id : yarn-cache-dir-path
31
+ run : echo "::set-output name=dir::$(yarn cache dir)"
32
+
33
+ - uses : actions/cache@v2
34
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
35
+ with :
36
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
37
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-yarn-
40
+
41
+ - name : Install dependencies
42
+ run : yarn --frozen-lockfile
43
+
44
+ - name : (WIP) Determine what version to release
45
+ run : npx lerna version --loglevel=silly --conventional-commits --exact
You can’t perform that action at this time.
0 commit comments