forked from nubasedev/potato
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) Β· 1.29 KB
/
release.yml
File metadata and controls
48 lines (40 loc) Β· 1.29 KB
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
name: π¦ Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: π Checkout
uses: actions/checkout@v3
- name: β¬’ Use Node.js
uses: actions/setup-node@v2
with:
node-version: 12.22.12
registry-url: "https://npm.pkg.github.com"
#- name: π Get npm cache directory path
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"
- name: π§Ά Get NPM cache
uses: actions/cache@v3
id: cache-npm # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: π¦ Install dependencies
run: npm install --frozen-lockfile
- name: π· Build
run: npm run build
- name: π Publish release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish --non-interactive