-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (47 loc) · 1.54 KB
/
post-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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: post-release
on:
release:
types: [published]
jobs:
post-release:
runs-on: ubuntu-latest
permissions:
# Needed by google-github-actions.
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: projects/757369538258/locations/global/workloadIdentityPools/chieapp-identity-pool/providers/github
service_account: chieapp-github-actions@lib-yue.iam.gserviceaccount.com
- name: Set package version
run: |
npm config set git-tag-version=false
npm version $(git describe --tags)
- name: Write latest_version.json
run: |
VERSION=`node -e "process.stdout.write(require('./package.json').version)"`
echo "{\"version\":\"$VERSION\"}" > latest_version.json
- name: Upload latest_version.json
uses: google-github-actions/upload-cloud-storage@v1
with:
path: latest_version.json
destination: chieapp
- name: Install deps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn
yarn prepack
- name: Publish chieapp package
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Publish types package
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
package: types