forked from iamkun/dayjs
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.12 KB
/
release.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
name: Publish package to GitHub Packages after merged to master
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 20
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.GITHUB_TRIGGER_REF }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@adscore'
- name: Install dependencies
run: npm clean-install
- name: Build
env: # temporary workaround for "Error: error:0308010C:digital envelope routines::unsupported" in Node lts / 18
NODE_OPTIONS: --openssl-legacy-provider
run: npm run build && npm run babel
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
npm publish