Skip to content

Build native code for both arm and x86 on release #28

Build native code for both arm and x86 on release

Build native code for both arm and x86 on release #28

Workflow file for this run

name: Release on tag
on:
# !!! DON'T FORGET TO REMOVE THIS
pull_request:
push:
tags:
- "v*"
permissions:
id-token: write
contents: write
jobs:
build-native-arm:
runs-on: codspeedhq-arm64-ubuntu-22.04
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 code on ARM
run: pnpm moon core:build-native-addon
- name: Upload ARM prebuilds
uses: actions/upload-artifact@v4
with:
name: arm-prebuilds
path: packages/core/prebuilds
build:
runs-on: ubuntu-latest
needs: build-native-arm
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 ARM prebuilds
uses: actions/download-artifact@v4
with:
name: arm-prebuilds
path: packages/core/prebuilds
# !!!!! DEBUG DO NOT MERGE
- name: Tmate Session
if: always()
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
# !!! UNCOMMENT
# - 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 }}
#
# - 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 }}