macoc/.forgejo/workflows/macos.yml

37 lines
1 KiB
YAML

name: macoc macOS
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
# A dedicated macOS Forgejo runner is required; register label macos:host.
# It must have Command Line Tools. There is no Linux/macOS cross-build.
runs-on: macos
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
with:
persist-credentials: false
- name: Run tests and static checks
run: bash scripts/verify.sh
- name: Build and package macOS app
run: bash scripts/package.sh
env:
MACOC_CODESIGN_IDENTITY: "${{ vars.MACOC_CODESIGN_IDENTITY }}"
- name: Publish Forgejo release on version tags
if: startsWith(forgejo.ref, 'refs/tags/v')
env:
FORGEJO_TOKEN: "${{ secrets.FORGEJO_TOKEN }}"
FORGEJO_SERVER_URL: "${{ forgejo.server_url }}"
FORGEJO_REPOSITORY: "${{ forgejo.repository }}"
FORGEJO_REF_NAME: "${{ forgejo.ref_name }}"
run: bash scripts/publish-release.sh