Skip to content

Publish server

Publish server #6

Workflow file for this run

name: Server - Release
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
#on:
# push:
# tags:
# - "v*.*.*"
env:
node_version: 14
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: "https://registry.npmjs.org"
- uses: jetli/[email protected]
with:
version: 'latest'
- run: ./scripts/publish-server.sh 0.0.1 # pass the version as an argument ${{ github.event.release.tag_name }} https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}