-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.3 KB
/
release.yml
File metadata and controls
48 lines (41 loc) · 1.3 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
name: Release & Publish to NPM
on: workflow_dispatch
# See https://docs.npmjs.com/trusted-publishers
permissions:
id-token: write # Required for OIDC
contents: write # Required for creating tags and GitHub releases
pull-requests: write # Required for changesets to create release PRs
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Setup
uses: ./.github/actions/setup
- name: Initialize Git user
run: |
git config --global user.email "dev@contentpass.de"
git config --global user.name "Release Workflow"
- name: Lint, test, typecheck
run: |
yarn lint
yarn test
yarn typecheck
yarn prettier:check
- name: Build
run: yarn build
- name: Create release pull request or publish
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset:version
publish: yarn changeset:publish
title: "chore: version packages"
commit: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}