File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 6262 yarn coverage:upload
6363 env :
6464 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
65+
66+ release :
67+ runs-on : ubuntu-latest
68+ if : startsWith(github.ref, 'refs/tags/v')
69+ needs :
70+ - build
71+
72+ steps :
73+ - name : Checkout
74+ uses : actions/checkout@v2
75+
76+ - name : Use Node
77+ id : setup-node
78+ uses : actions/setup-node@v2
79+ env :
80+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
81+ with :
82+ node-version : 14.x
83+ registry-url : ' https://registry.npmjs.org'
84+
85+ - name : Get Yarn Cache
86+ id : yarn-cache
87+ run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
88+
89+ - name : Yarn Cache
90+ uses : actions/cache@v2
91+ with :
92+ path : ${{ steps.yarn-cache.outputs.dir }}
93+ key : yarn2-${{ hashFiles('yarn.lock') }}
94+ restore-keys : |
95+ yarn2-
96+
97+ - name : Deps
98+ run : |
99+ yarn --immutable
100+
101+ - name : Publish
102+ env :
103+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
104+ run : |
105+ npm publish --access public
106+
107+ - name : Release
108+ uses : actions/create-release@v1
109+ env :
110+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111+ with :
112+ tag_name : ${{ github.ref }}
113+ release_name : Release ${{ github.ref }}
114+ body_path : CHANGELOG.md
115+ draft : false
116+ prerelease : contains(github.ref, '-')
You can’t perform that action at this time.
0 commit comments