-
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (45 loc) · 1.33 KB
/
deploy-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
---
#######################################
# Start the job on all push to master #
#######################################
name: "Deploy release"
on:
release:
# Want to run the automation when a release is created
types: ["created"]
permissions: read-all
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Deploy release on NPM
# Set the agent to run on
runs-on: ubuntu-latest
# Only run this on the main repo
if: "!contains(github.event.head_commit.message, 'skip deploy')"
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
##############################################################
# Publish updated version of markdown-table-formatter on NPM #
##############################################################
- uses: actions/[email protected]
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm run test:coverage
- run: git status && git stash
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}