-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Deploy Workflow | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
build: | ||
name: Deploy | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
node-version: [14] | ||
runs-on: ubuntu-latest | ||
container: node:${{ matrix.node-version }}-buster | ||
steps: | ||
- name: Checkout code from repository | ||
uses: actions/checkout@v4 | ||
- name: Print Node.js information | ||
run: node --version | ||
- name: Install package | ||
run: npm install | ||
- name: Install package (development) | ||
run: npm install --only=dev | ||
- name: Verify Javascript code linting | ||
run: npm run lint | ||
- name: Run unit tests | ||
run: npm test | ||
- name: Deploy package to NPM | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
npm publish | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |