Files
v2rayN/.github/workflows/build-osx.yml
T
DHR60 78b0b2224b Native Aot (#10295)
* Protect models

* Json Context

* YAML AOT-friendly optimization

* Run the Test in AOT mode

* Remove TaskScheduler

* Clean build output

* Workflows
2026-11-01 20:29:06 +08:00

104 lines
2.2 KiB
YAML

name: release macOS
on:
workflow_dispatch:
inputs:
release_tag:
required: false
type: string
push:
branches:
- master
permissions:
contents: write
actions: read
jobs:
build:
uses: ./.github/workflows/build.yml
with:
target: macos
release-zip:
if: inputs.release_tag != ''
needs: build
uses: ./.github/workflows/package-zip.yml
with:
target: macos
release_tag: ${{ inputs.release_tag }}
secrets: inherit
build-aot:
uses: ./.github/workflows/build.yml
with:
target: macos
isAot: true
release-aot-zip:
if: inputs.release_tag != ''
needs: build-aot
uses: ./.github/workflows/package-zip.yml
with:
target: macos
release_tag: ${{ inputs.release_tag }}
isAot: true
secrets: inherit
dmg:
name: package and release macOS dmg
if: inputs.release_tag != ''
needs: build
strategy:
matrix:
arch: [ x64, arm64 ]
runs-on: macos-latest
env:
Arch: |-
${{
case(
matrix.arch == 'x64', '64',
matrix.arch
)
}}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Restore build artifacts
uses: actions/download-artifact@v8
with:
name: ${{ matrix.arch }}
path: v2rayN-macos-${{ env.Arch }}
- name: Setup create-dmg
run: brew install create-dmg
- name: Ensure script permissions
run: chmod 755 package-osx.sh
- name: Package dmg
run: ./package-osx.sh macos-$Arch v2rayN-macos-$Arch ${{ inputs.release_tag }}
- name: Upload dmg artifact
uses: actions/upload-artifact@v7
with:
name: release-dmg-${{ matrix.arch }}
path: v2rayN*.dmg
if-no-files-found: error
release-dmg:
name: sign and upload macOS dmg
if: inputs.release_tag != ''
needs: dmg
strategy:
matrix:
arch: [ x64, arm64 ]
uses: ./.github/workflows/upload-sign.yml
with:
release_tag: ${{ inputs.release_tag }}
artifact_name: release-dmg-${{ matrix.arch }}
file_pattern: '*.dmg'
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}