-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.5 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
57
58
59
60
61
62
name: Build and Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
CI: true
NODE_ENV: "develop"
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install pnpm package manager
run: npm i pnpm@latest -g
- name: Setup CI Git User
run: |
git config --global user.name "miguelramos"
git config --global user.email "miguel.ramos@websublime.dev"
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
@websublime:registry=https://npm.pkg.github.com
EOF
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Create Release
uses: changesets/action@v1.4.5
with:
setupGitUser: false
publish: pnpm release
title: "Production Release"
commit: "chore(release): artifact published to github packages"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.GH_TOKEN }}