v1.6.1 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
####################################### | |
# 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 }} |