v2rayN/.github/workflows/build-osx.yml
Bonjour LI e56fca05fc
Some checks are pending
release Linux / build (push) Waiting to run
release Linux / release-zip (push) Blocked by required conditions
release Linux / build and release deb (push) Waiting to run
release Linux / build and release rpm (push) Waiting to run
release macOS / build (push) Waiting to run
release macOS / release-zip (push) Blocked by required conditions
release macOS / package and release macOS dmg (push) Blocked by required conditions
release Windows desktop (Avalonia UI) / build (push) Waiting to run
release Windows desktop (Avalonia UI) / release-zip (push) Blocked by required conditions
release Windows / build (push) Waiting to run
release Windows / release-zip (push) Blocked by required conditions
Refactor and Optimize CI Workflow (#9083)
* Refactor and Optimize CI Workflow

* Refactor and Optimize CI Workflow (Added input option value annotations for clarity.)
2026-04-14 09:41:07 +08:00

71 lines
1.5 KiB
YAML

name: release macOS
on:
workflow_dispatch:
inputs:
release_tag:
required: false
type: string
push:
branches:
- master
permissions:
contents: write
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 }}
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@v6.0.2
- 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 to release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ github.workspace }}/v2rayN*.dmg
tag: ${{ inputs.release_tag }}
file_glob: true
prerelease: true