-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.38 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build executable for release
run: swift build -c release --arch arm64 --arch x86_64 --product create-project-plist
- name: Compress archive
run: tar -czf create-project-plist.v${{ github.ref_name }}.tar.gz -C .build/apple/Products/Release create-project-plist
- name: Get latest release info
id: query-release-info
uses: release-flow/keep-a-changelog-action@v2
with:
command: query
version: latest
- name: Release
id: create-release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.query-release-info.outputs.release-notes }}
files: create-project-plist.v${{ github.ref_name }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
- name: Send repository dispatch to Homebrew tap of Astzweig
run: |
curl -XPOST \
-H "Authorization: Bearer ${{ secrets.HOMEBREW_FORMULAE_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/astzweig/homebrew-formulae/actions/workflows/bumpnbottle.yml/dispatches \
--data '{"ref":"main", "inputs": {"formula": "create-project-plist"}}'