-
-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (44 loc) · 1.29 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
name: Release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- '.changeset/**'
- '.github/workflows/release.yml'
- 'pnpm-lock.yaml'
jobs:
release:
# prevents this action from running on forks
if: github.repository == 'bluwy/whyframe'
name: Release
permissions:
pull-requests: write # to create pull request (changesets/action)
contents: write # to create release (changesets/action)
id-token: write # OpenID Connect token needed for provenance
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for changelog generation
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
commit: Release packages
title: Release packages
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true