-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.59 KB
/
release-cdk-express.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
name: 📦 Release @last9/cdk-express-js
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: 16.20.0
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
working-directory: ./js/express
run: npm install --frozen-lockfile
- name: 👷 Build
working-directory: ./js/express
run: npm run build
- name: 🚀 Publish release
working-directory: ./js/express
if:
startsWith(github.ref, 'refs/tags/') &&
contains(github.event.release.tag_name, '@last9/cdk-express-js')
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish --non-interactive