forked from clauderic/dnd-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.33 KB
/
release.yml
File metadata and controls
54 lines (47 loc) · 1.33 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
name: Release
on:
push:
branches:
- main
permissions:
id-token: write # Required for OIDC
contents: write # Required for changesets/action@v1
pull-requests: write # Required for changesets/action@v1
jobs:
release:
name: ${{ matrix.channel }}
runs-on: ubuntu-latest
environment: production
strategy:
max-parallel: 1
matrix:
channel:
- current
- beta
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20'
# https://github.com/atlassian/changesets/issues/550#issuecomment-811245508
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@latest
- uses: oven-sh/setup-bun@v1
- run: bun install && bun run build
- name: Create Release Pull Request or Publish to npm
if: matrix.channel == 'current'
uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish packages on npm with @beta tag
if: matrix.channel == 'beta'
run: |
npm run version-packages:beta
npm run release:beta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}