Skip to content

1.27.1

1.27.1 #91

Workflow file for this run

name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta.*"
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'playcanvas' }}
permissions:
contents: write
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Node.js 18.x
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: "npm"
registry-url: "https://registry.npmjs.org/"
- name: Parse tag name
id: parse_tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: npm ci
- name: Build SuperSplat Viewer
run: npm run build
env:
NODE_ENV: production
- name: Run Publint
run: npm run publint
- name: Publish to npm
run: |
if [[ "${{ steps.parse_tag.outputs.tag }}" =~ "beta" ]]; then
tag=beta
else
tag=latest
fi
npm publish --tag $tag --provenance
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
prerelease: ${{ contains(steps.parse_tag.outputs.tag, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}