-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.18 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
name: Release
on:
push:
branches:
- main
pull_request:
branches:
- '*'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build process
uses: devcontainers/ci@v0.3
with:
runCmd: |
npm ci
npm run turbo:ci:build
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20.x"
- uses: actions/checkout@v3
- name: Install dependencies
run: |
npm ci
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1.4.5
with:
# these commands build & tests as well
publish: npm run turbo:ci:publish
version: npm run turbo:ci:version
commit: "chore: release"
title: "chore: release"
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}