-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (41 loc) · 1.26 KB
/
release.yaml
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: Create a new Release
on:
push:
branches:
- release/**
jobs:
javascript:
runs-on: ubuntu-latest
steps:
# Setup
- uses: wemogy/[email protected]
id: release-version
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout at release tag
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org
# Build
- name: Install packages
run: yarn install
- name: Set version number
run: npm version ${{ steps.release-version.outputs.next-version }} --no-git-tag-version --allow-same-version
- name: Build application
run: yarn build
- name: Publish NPM package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Create GitHub Release
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release-version.outputs.next-version }}
name: Version ${{ steps.release-version.outputs.next-version }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}