Skip to content

v5.4.0

v5.4.0 #39

Workflow file for this run

name: Release on tag
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
build-native:
strategy:
matrix:
platform:
# The x86_64 Linux prebuild is generated when running pnpm moon run :build in the `build` job
- runs-on: codspeedhq-arm64-ubuntu-22.04
name: linux-arm
- runs-on: macos-latest
name: darwin-arm
runs-on: ${{ matrix.platform.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version-file: .nvmrc
- run: pnpm install --frozen-lockfile --prefer-offline
- name: Build native addon
run: pnpm moon core:build-native-addon
- name: Upload prebuilds
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.name }}-prebuilds
path: packages/core/prebuilds
build:
runs-on: ubuntu-latest
needs: build-native
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version-file: .nvmrc
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile --prefer-offline
- name: Build the libraries
run: pnpm moon run :build
- name: Download prebuilds
uses: actions/download-artifact@v4
with:
pattern: "*-prebuilds"
merge-multiple: true
path: packages/core/prebuilds
- if: github.event_name == 'push'
name: Publish the libraries
run: |
if [[ "${{ github.ref }}" == *"-alpha"* ]]; then
pnpm publish -r --access=public --no-git-checks --tag=alpha
else
pnpm publish -r --access=public --no-git-checks
fi
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: github.event_name == 'push'
name: Create a draft release
run: |
NEW_VERSION=$(pnpm lerna list --json | jq -r '.[] | select(.name == "@codspeed/core") | .version')
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}