-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (39 loc) · 1.3 KB
/
release.yaml
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
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main
# Install changesets locally
- name: Install dependencies
run: pnpm install
# Build custom changelog formatter
- name: Build changelog formatter
run: pnpm --filter design-system-changelog-github build
# The changeset action will behave differently based on whether there are
# new changesets on the main branch:
#
# - new changesets: create a preview PR with the new version bumps and changelogs
# - no new changesets (the preview PR got merged into main): publish packages
- name: Changeset magic
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
title: 'chore(changesets): 🦋📦 publish packages'
commit: 'chore(changesets): publish packages'
publish: pnpm changeset:publish
version: pnpm changeset:version