-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.35 KB
/
Copy pathrelease.yml
File metadata and controls
46 lines (42 loc) · 1.35 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
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: 🛎 Checkout
uses: actions/checkout@v5
- name: 🏗 Setup PNPM
uses: pnpm/action-setup@v4
- name: 🏗 Setup NodeJS
uses: actions/setup-node@v4
with: { node-version-file: .node-version, cache: pnpm }
- name: 📦 Install dependencies
run: pnpm install
- name: 🧪 Run tests
run: pnpm test
- name: 🏗 Build Packages
run: pnpm build '--filter=./packages/*'
- name: 🦋 Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm publish-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: 🛳️ Deploy to JSR
# working-directory: ./packages/site-builder
# run: pnpx jsr publish
# - name: 📢 Send a Slack notification if a publish happens
# if: steps.changesets.outputs.published == 'true'
# # You can do something when a publish happens.
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"