Skip to content

fix(topbar): add beta label to selected app (#14) #14

fix(topbar): add beta label to selected app (#14)

fix(topbar): add beta label to selected app (#14) #14

Workflow file for this run

name: Publish NPM packages
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.head_commit.message, 'release:') }}
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Extract version number
id: vars
run: echo ::set-output name=version::$(jq -r .version package.json)
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://npm.pkg.github.com"
scope: "@axiscommunications"
- name: Install dependencies
run: |
corepack enable
corepack prepare --activate
pnpm install --frozen-lockfile
- name: Build
env:
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm build
- name: Release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.vars.outputs.version }}
release_name: Release v${{ steps.vars.outputs.version }}
body_path: CHANGELOG.md
draft: false
prerelease: false
- name: Upload changelog
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: CHANGELOG.md
asset_name: CHANGELOG.md
asset_content_type: text/markdown
- name: Deploy NPM packages (FIXME)
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ $GITHUB_REF =~ alpha|beta ]]; then
pnpm -r publish --tag next
else
pnpm -r publish --tag latest
fi