Skip to content

ci: build for macos (#22) #3

ci: build for macos (#22)

ci: build for macos (#22) #3

Workflow file for this run

name: Create release
on:
push:
tags:
- "v*.*.*"
jobs:
build-aot:
name: Build Native AOT
strategy:
matrix:
# https://github.com/actions/runner-images
os: [ubuntu-latest, windows-latest, macos-14]
runs-on: ${{ matrix.os }}
env:
# temp fix frontend build
# Treating warnings as errors because process.env.CI = true.
# Most CI servers set it automatically.
CI: 'false'
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/setup-net-core-sdk
- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
global-json-file: global.json
- uses: actions/setup-node@v4
with:
# Version Spec of the version to use in SemVer notation.
# It also emits such aliases as lts, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: 20
- name: Publish AOT version
shell: pwsh
run: |
./scripts/publish-native-aot.ps1
# TODO join steps
- name: 'Upload Artifact linux-x64'
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: Heartbeat-linux-x64
path: artifacts/linux-x64/
retention-days: 1
- name: 'Upload Artifact win-x64'
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: Heartbeat-win-x64
path: artifacts/win-x64/
retention-days: 1
- name: 'Upload Artifact osx-arm64'
if: ${{ matrix.os == 'macos-14' }}
uses: actions/upload-artifact@v4
with:
name: Heartbeat-osx-arm64
path: artifacts/osx-arm64/
retention-days: 1
release:
needs: build-aot
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# https://github.com/actions/download-artifact
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
merge-multiple: false
- name: Zip artifacts
working-directory: ./release-artifacts
run: for i in */; do zip -r "${i%/}.zip" -m "$i"; done
# https://github.com/softprops/action-gh-release
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: release-artifacts/**