-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (47 loc) · 1.68 KB
/
packages-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
name: Packages Release
on:
workflow_call:
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
turbo-all:
name: Compile, lint, test, & build
uses: ./.github/workflows/turbo-ci.yml
packages-release:
name: Packages Release
environment: labs-approval
runs-on: buildjet-2vcpu-ubuntu-2204
needs: turbo-all
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Access build cache
id: built
uses: buildjet/cache@v3
with:
path: .turbo
key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built
restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js 21.x
uses: buildjet/setup-node@v4
with:
node-version: '21'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Disable telemetry
run: pnpm turbo telemetry disable
- name: Build packages
run: pnpm turbo build --cache-dir=.turbo
# If there are changesets, this action will create a PR on the repo to version packages
# If there are none, it will publish newer-versioned public packages to npm
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}