Skip to content

Commit 8424ae5

Browse files
committed
🤖 Make CI deploy to npm.
1 parent 9ec862a commit 8424ae5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy New Version to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
# Set the job key. The key is displayed as the job name
10+
# when a job name is not provided
11+
build-and-publish:
12+
name: Build, Test, and Deploy
13+
# Set the type of machine to run on
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [18.11.0]
18+
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Install Dependencies
24+
run: yarn install --production=false
25+
26+
- name: Build Codebase
27+
run: yarn build
28+
29+
- name: Install SSH key
30+
uses: shimataro/ssh-key-action@v2
31+
with:
32+
key: ${{ secrets.SSH_PRIVATE_KEY }}
33+
name: id_rsa # optional
34+
known_hosts: unnecessary
35+
if_key_exists: replace
36+
- name: Set RELEASE_VERSION
37+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
38+
- name: Run Test Suite
39+
run: yarn test --verbose
40+
- name: Output Release
41+
run: echo ${RELEASE_VERSION}

0 commit comments

Comments
 (0)