File tree 2 files changed +70
-0
lines changed
2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Experimental Releases'
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ release :
8
+ name : ' Release'
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Cancel Previous Runs
12
+
13
+ with :
14
+ access_token : ${{ secrets.GITHUB_TOKEN }}
15
+
16
+ - uses : actions/checkout@v3
17
+
18
+ - name : Setup npmrc
19
+ run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
20
+
21
+ - uses : actions/setup-node@v3
22
+ with :
23
+ node-version : 18
24
+
25
+ - name : Get yarn cache directory path
26
+ id : yarn-cache-dir
27
+ run : echo "::set-output name=dir::$(yarn cache dir)"
28
+
29
+ - name : Restore yarn cache
30
+ uses : actions/cache@v3
31
+ id : yarn-cache
32
+ with :
33
+ path : ${{ steps.yarn-cache-dir.outputs.dir }}
34
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35
+ restore-keys : |
36
+ ${{ runner.os }}-yarn-
37
+
38
+ - name : Install
39
+ run : yarn install
40
+
41
+ - run : ./scripts/version-and-publish.sh
42
+ env :
43
+ VERSION : ' ${{ github.sha }}'
44
+ DIST_TAG : experimental
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Force start from root folder
4
+ cd " $( dirname " $0 " ) /.."
5
+
6
+ set -e
7
+
8
+ version=$VERSION
9
+ distTag=$DIST_TAG
10
+
11
+ if [[ -z " $version " ]]; then
12
+ echo " Please enter the version you want to publish"
13
+ read -r version
14
+ fi
15
+
16
+ if [[ -z " $distTag " ]]; then
17
+ echo " Please enter the dist-tag you want to publish with"
18
+ read -r distTag
19
+ fi
20
+
21
+
22
+ echo " $version "
23
+
24
+ # publish packages
25
+ ./node_modules/.bin/changeset version --snapshot " $version "
26
+ ./node_modules/.bin/changeset publish --no-git-tag --snapshot --tag " $distTag "
You can’t perform that action at this time.
0 commit comments