Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,27 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to build and publish (e.g. v0.3.2)"
required: true
type: string

jobs:
build:
name: Build macOS binary
runs-on: macos-26
permissions:
contents: write
env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand All @@ -28,7 +38,7 @@ jobs:

- name: Create tarball
run: |
VERSION="${GITHUB_REF_NAME}"
VERSION="${RELEASE_TAG}"
tar -czf "mocker-${VERSION}-arm64-apple-macosx.tar.gz" \
-C .build/release mocker
echo "TARBALL=mocker-${VERSION}-arm64-apple-macosx.tar.gz" >> $GITHUB_ENV
Expand All @@ -43,6 +53,7 @@ jobs:
- name: Upload binary to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag || github.ref_name }}
files: ${{ env.TARBALL }}

- name: Update Homebrew formula
Expand Down
Loading