-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (39 loc) · 1.37 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
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Fetch Git history so that Changesets can generate changelogs with the correct commits
# - A value of 0 will fetch all Git history, this can get slow as the history grows
# - Set a reasonable value of the number of commits you want to fetch from Git history (e.g: last 50 commits)
# - Adjust this value if necessary once we have stable releases
fetch-depth: 100
- name: Setup Node.js 14.15 And npm Org
uses: actions/setup-node@v2
with:
node-version: 14.15
registry-url: "https://registry.npmjs.org"
scope: "@voucherify"
- name: Cache Yarn Dependencies
uses: c-hive/gha-yarn-cache@v1
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
title: "Version Packages"
commit: "Version Packages"
version: yarn pkg:version
publish: yarn pkg:release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}