-
-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (57 loc) · 2.04 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
46
47
48
49
50
51
52
53
54
55
56
57
name: "Release"
on:
push:
branches:
- master
jobs:
release:
if: |
startsWith(github.event.head_commit.message, 'ci(release): ts auto mock new version') != true
&& startsWith(github.event.head_commit.message, 'chore(performance): add performance data') != true
&& startsWith(github.event.head_commit.message, 'chore(definitelyTyped): add definitelyTyped tests data') != true
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ lts/iron ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUBTYPESCRIPTTDD }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Cache node_modules
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: build library
run: npm run build
- name: Register Token
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > /home/runner/work/_temp/.npmrc
echo "email=<[email protected]>" >> /home/runner/work/_temp/.npmrc
echo "always-auth=true" >> /home/runner/work/_temp/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTYPESCRIPTTDD }}
GIT_AUTHOR_NAME: typescripttdd
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: typescripttdd
GIT_COMMITTER_EMAIL: typescripttdd
SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npm run release