# 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" build-mac: # The type of runner that the job will run on runs-on: macos-14 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 run: CGO_ENABLED=0 ./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-{version}.zip containing build/luxd mkdir -p build 7z a "node-macos-${TAG}.zip" build/luxd env: TAG: ${{ env.TAG }} - name: Save as Github artifact uses: actions/upload-artifact@v7 with: name: build path: node-macos-${{ env.TAG }}.zip - name: Cleanup run: | rm -rf ./build