-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (57 loc) · 1.79 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release
on:
workflow_call:
inputs:
nonce:
type: string
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Restore cached build files
uses: actions/cache@v4
with:
key: ${{ inputs.nonce }}
path: |
./css/dist
./icon-registry/dist
./components
./node_modules
- name: Install Dependencies
run: yarn install --frozen-lockfile
env:
CI: true
- name: Set committer info
## attribute the commit to cypress-bot: https://github.community/t/logging-into-git-as-a-github-app/115916
run: |
git config --local user.email "${{ secrets.CYPRESS_BOT_APP_ID }}+cypress-bot[bot]@users.noreply.github.com"
git config --local user.name "cypress-bot[bot]"
- name: Configure .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set version numbers
run: node scripts/set-version.mjs
- name: Remove changeset pre if it exists
run: yarn changeset pre exit
continue-on-error: true
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
publish: yarn changeset publish
commit: 'ci(changesets): version packages'
title: 'ci(changesets): version packages'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}