-
Notifications
You must be signed in to change notification settings - Fork 21
37 lines (37 loc) · 1.1 KB
/
publish-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
name: Release a new version
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 12
- name: Install lerna and all packages
run: npm ci
- name: Build all packages
run: npm run build
- name: Run linter in all packages
run: npm run lint
- name: Run tests in all packages
run: npm run test
- name: Configure git user
run: |
git config --local user.email "[email protected]"
git config --local user.name "empathy/x"
- name: Create .npmrc file with authorization token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish the release
run: 'npm run publish-release'
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true