mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
- build-linux-binaries.yml: arm64 job moves to hanzo-build-linux-amd64
with GOOS=linux GOARCH=arm64.
- build-ubuntu-arm64-release.yml: both jammy/focal jobs cross-compile
on the amd64 self-hosted runner.
- build-macos-release.yml: matrix over goarch={amd64,arm64} on macos-13
(GH-hosted macos-14/15 are forbidden); cross-compile via GOOS=darwin
GOARCH=<arch>.
- build-and-test-mac-windows.yml: pin macos-latest -> macos-13.
- ci.yml: drop macos-14 from CI matrix (use macos-13).
- actionlint.yml: drop hanzo-build-linux-arm64 + ubuntu-24.04-arm from
the self-hosted-runner whitelist.
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
# Build a macos release from the luxd repo
|
|
|
|
name: build-macos-release
|
|
|
|
# Controls when the action will run.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Tag to include in artifact name'
|
|
required: true
|
|
workflow_call:
|
|
inputs:
|
|
tag:
|
|
description: 'Tag to include in artifact name'
|
|
required: true
|
|
type: string
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
# This workflow contains a single job called "build"
|
|
# Cross-compile both darwin/amd64 and darwin/arm64 on macos-13.
|
|
build-mac:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
goarch: [amd64, arm64]
|
|
# The type of runner that the job will run on (GH-hosted arm64 macos forbidden).
|
|
runs-on: macos-13
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-go-for-project
|
|
- run: go version
|
|
|
|
# Runs a single command using the runners shell
|
|
- name: Build the luxd binary (cross-compile via GOOS/GOARCH)
|
|
run: CGO_ENABLED=0 GOOS=darwin GOARCH=${{ matrix.goarch }} ./scripts/run_task.sh build
|
|
|
|
- name: Try to get tag from git
|
|
if: "${{ github.event.inputs.tag == '' }}"
|
|
id: get_tag_from_git
|
|
run: |
|
|
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
|
|
shell: bash
|
|
|
|
- name: Try to get tag from workflow dispatch
|
|
if: "${{ github.event.inputs.tag != '' }}"
|
|
id: get_tag_from_workflow
|
|
run: |
|
|
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
|
|
shell: bash
|
|
|
|
- name: Create zip file with CLI-compatible naming
|
|
run: |
|
|
# CLI expects: node-macos-{arch}-{version}.zip containing build/luxd
|
|
mkdir -p build
|
|
7z a "node-macos-${{ matrix.goarch }}-${TAG}.zip" build/luxd
|
|
env:
|
|
TAG: ${{ env.TAG }}
|
|
|
|
- name: Save as Github artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: build-darwin-${{ matrix.goarch }}
|
|
path: node-macos-${{ matrix.goarch }}-${{ env.TAG }}.zip
|
|
|
|
- name: Cleanup
|
|
run: |
|
|
rm -rf ./build
|