Skip to content

Commit 2f6d7ed

Browse files
Cortex Devfactory-droid[bot]
andcommitted
feat: Add auto-publish to Winget and Homebrew
- winget.yml: Auto-submit PR to microsoft/winget-pkgs - homebrew.yml: Auto-update CortexLM/homebrew-tap formula Requires secrets: WINGET_PAT, HOMEBREW_TAP_TOKEN Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 97a0a45 commit 2f6d7ed

2 files changed

Lines changed: 43 additions & 12 deletions

File tree

.github/workflows/homebrew.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Homebrew Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Release tag (e.g., v0.1.0)'
10+
required: true
11+
12+
jobs:
13+
update-homebrew:
14+
name: Update Homebrew Formula
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Get tag name
20+
id: tag
21+
run: |
22+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
23+
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
24+
else
25+
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
26+
fi
27+
28+
- name: Update Homebrew formula
29+
uses: mislav/bump-homebrew-formula-action@v3
30+
with:
31+
formula-name: cortex
32+
homebrew-tap: CortexLM/homebrew-tap
33+
download-url: https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.tag }}/cortex-macos-arm64.tar.gz
34+
commit-message: |
35+
{{formulaName}} {{version}}
36+
37+
Created by https://github.com/mislav/bump-homebrew-formula-action
38+
env:
39+
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.github/workflows/winget.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,12 @@ jobs:
152152
run: |
153153
.\wingetcreate.exe validate ${{ env.MANIFEST_DIR }}
154154
155-
- name: Submit to winget-pkgs (manual step)
155+
- name: Submit to winget-pkgs
156156
shell: pwsh
157157
run: |
158-
Write-Host "==============================================="
159-
Write-Host "Winget manifests generated successfully!"
160-
Write-Host "==============================================="
161-
Write-Host ""
162-
Write-Host "To submit to winget-pkgs repository:"
163-
Write-Host "1. Fork https://github.com/microsoft/winget-pkgs"
164-
Write-Host "2. Copy the manifests from: ${{ env.MANIFEST_DIR }}"
165-
Write-Host "3. Create a PR to microsoft/winget-pkgs"
166-
Write-Host ""
167-
Write-Host "Or use wingetcreate with a GitHub token:"
168-
Write-Host ".\wingetcreate.exe submit ${{ env.MANIFEST_DIR }} --token <PAT>"
158+
.\wingetcreate.exe submit ${{ env.MANIFEST_DIR }} --token ${{ secrets.WINGET_PAT }}
159+
env:
160+
WINGET_PAT: ${{ secrets.WINGET_PAT }}
169161

170162
- name: Upload manifests as artifact
171163
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)