Repository navigation
63 lines (60 loc) · 2.18 KB
/
Copy pathchangeset-release.yml
File metadata and controls
63 lines (60 loc) · 2.18 KB
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
name: Release
on:
push:
branches:
- main
paths:
- '.github/workflows/changeset-release.yml'
- '.changeset/**'
- 'packages/*/CHANGELOG.md'
- 'packages/*/package.json'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog:
runs-on: ubuntu-24.04-arm
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
disable-sudo-and-containers: true
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-tags: true # Important to fetch all history for versioning
- run: git config set --type=bool push.autoSetupRemote true
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: npm ci --ignore-scripts --include-workspace-root --workspaces
- run: npm --include-workspace-root --workspaces run-script install --if-present
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
packages/*/.tsbuildinfo
packages/*/dist
key: tsc-${{ hashFiles('**/*.tsbuildinfo', '**/package-lock.json') }}
enableCrossOsArchive: true
- run: npm run build
- uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
packages/*/.tsbuildinfo
packages/*/dist
key: tsc-${{ hashFiles('**/*.tsbuildinfo', '**/package-lock.json') }}
enableCrossOsArchive: true
- uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
publish-script: npx lerna publish from-package --yes
create-github-releases: true
github-token: ${{ github.token }}