-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (49 loc) · 1.6 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
40
41
42
43
44
45
46
47
48
49
50
51
name: Release @flows/${{ github.event.inputs.package }}@${{ github.event.inputs.type }}
on:
workflow_dispatch:
inputs:
type:
description: "Release type"
required: true
type: choice
options:
- canary
- patch
- minor
- major
package:
description: "Package"
required: true
type: choice
options:
- react
- react-components
- js
- js-components
jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: 906021
private-key: ${{ secrets.FLOWS_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: git remote set-url origin https://flows-bot[bot]:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}
- run: git config user.name "flows-bot[bot]"
- run: git config user.email "170794745+flows-bot[bot]@users.noreply.github.com"
- run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- run: pnpm install
- run: node scripts/release.js --release=${{ github.event.inputs.type }} --package=${{ github.event.inputs.package }}