-
Notifications
You must be signed in to change notification settings - Fork 43
56 lines (48 loc) · 1.61 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
51
52
53
54
55
56
name: Release
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Create Github Token as Changesets-Bot
id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CHANGESETS_RELEASE_APP_ID }}
private_key: ${{ secrets.CHANGESETS_RELEASE_PRIVATE_KEY }}
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ steps.create_token.outputs.token }}
fetch-depth: 0
fetch-tags: true
- name: Setup git user as Changesets Bot
# The bot id is taken from https://api.github.com/users/changesets-release-app[bot]
run: |
git config --global user.name "changesets-release-app[bot]"
git config --global user.email "152388490+changesets-release-app[bot]@users.noreply.github.com"
- name: Setup pnpm and node
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Build package
run: pnpm build
- name: Changesets Release
uses: changesets/action@v1
with:
commit: 'chore(release): Release latest changesets'
title: 'chore(release): Release latest changesets'
setupGitUser: false
createGithubReleases: true
publish: pnpm changeset tag
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}