-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.6 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: publish-release
on: workflow_dispatch
jobs:
publish-release:
name: Release - Publish
runs-on: ubuntu-latest
steps:
# Cloning
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYNTEST_CI }}
fetch-depth: 0
# Setup, Caching, and .npmrc file to publish to npm
- name: Use latest Node.js LTS version
uses: actions/setup-node@v3
with:
node-version: lts/*
# NPM Cache using all package-lock files as hash
cache: "npm"
cache-dependency-path: "**/package-lock.json"
# NPM Publishing settings
registry-url: "https://registry.npmjs.org"
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
# Configure git user
- name: Config git user
run: |
git config --global user.name 'SynTest CI'
git config --global user.email 'info@syntest.org'
# Dependencies
- name: SynTest - Install Dependencies
run: npm ci
# Building
- name: SynTest - Build
run: npm run build
# Versioning
- name: SynTest - Version
env:
GH_TOKEN: ${{ secrets.SYNTEST_CI }}
run: npx lerna version --conventional-commits --conventional-graduate --changelog-preset conventionalcommits --create-release github --yes --loglevel silly
# Publishing
- name: SynTest - Publish
env:
GH_TOKEN: ${{ secrets.SYNTEST_CI }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
run: npx lerna publish from-git --yes --loglevel silly