-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (45 loc) · 1.45 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
name: npm-publish
on:
push:
tags:
- "*"
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 16.3.0
uses: actions/setup-node@v4
with:
node-version: 16.3.0
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn build
- name: Inject slug/short variables
# v4
uses: rlespinasse/github-slug-action@4bf56f04ea9faff3369ab49afe31f76e3178ff7a
- name: Validate Tag
run: yarn semver $GITHUB_REF_SLUG
- name: Update versions of packages
run: yarn setupRelease $GITHUB_REF_SLUG
- name: Publish packages
run: npm publish --workspace=packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} #
- name: Install git-chglog
# v1
uses: craicoverflow/install-git-chglog@6d338c1d96dcbf12a2115fbe8e5b9817293aae33
- name: Generate changelog
run: |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$(git-chglog $GITHUB_REF_SLUG 2> /dev/null || echo '**PRERELEASE**')" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Update Release Notes
# 2.0
uses: meeDamian/github-release@7ae19492500104f636b3fee4d8103af0fed36c8e
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ env.CHANGELOG }}
allow_override: true