Skip to content

v0.5.1-rc.3

v0.5.1-rc.3 #67

Workflow file for this run

name: publish-npm
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- uses: actions/setup-node@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
with:
node-version: '18'
registry-url: https://registry.npmjs.org/
scope: '@mat-github-ci'
- name: Install dependencies
run: |
npm install --legacy-peer-deps
- name: Build project
run: |
npm run build-publish
- name: Sync version from Git Tag
run: |
npm version ${{ github.ref_name }} --no-git-tag-version
- name: Publish to NPM
run: |
echo Publishing to test repo $NODE_AUTH_TOKEN
VERSION=$(node -p "require('./package.json').version")
if [[ "$VERSION" == *"-rc"* ]]; then
npm publish --tag rc
else
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}