Skip to content

4.52.0

4.52.0 #95

Workflow file for this run

name: Publish release
on:
page_build:
release:
types:
- published
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile --ignore-scripts
- run: npm run publish:latest
if: '!github.event.release.prerelease'
env:
NODE_AUTH_TOKEN: ${{secrets.NPMJS_PUBLISH_TOKEN}}
- run: npm run publish:dist
if: 'github.event.release.prerelease'
env:
NODE_AUTH_TOKEN: ${{secrets.NPMJS_PUBLISH_TOKEN}}
- uses: vimtor/action-zip@v1
with:
files: dist/
dest: build.zip
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build.zip
asset_name: build.zip
asset_content_type: application/zip