Skip to content

Update Outlook link base. #14

Update Outlook link base.

Update Outlook link base. #14

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- id: get-package
run: |
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/} | grep -oP '(?<=\d\.\d\.\d-)\w+' || echo 'latest')"
shell: bash
# Reuse steps from Pull Request workflow
- uses: actions/checkout@v3
- name: Check version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [[ "${{steps.get-package.outputs.version}}" != "v${PACKAGE_VERSION}" ]]; then
echo "Tag version ${{steps.get-package.outputs.version}} does not match package version ${PACKAGE_VERSION}."
exit 1
fi
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm -r --frozen-lockfile install
- name: Build
run: pnpm build
- name: Run tests
run: pnpm test
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access=public --tag=${{ steps.get-package.outputs.tag }}