Repository navigation
66 lines (59 loc) · 1.95 KB
/
Copy pathrelease.yml
File metadata and controls
66 lines (59 loc) · 1.95 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Builds the XCFrameworks AudioStreaming uses and publishes them as release assets.
#
# Push a tag (for example `1.0.0`) to build ogg, vorbis and opus and attach
# `<name>.xcframework.zip` for each to a release of that tag. The release notes list
# the checksums for `.binaryTarget(name:url:checksum:)` in AudioStreaming's Package.swift.
#
# This file is the only change on top of sbooth/AudioXCFrameworks, so syncing the
# fork from upstream doesn't conflict.
name: Release XCFrameworks
on:
push:
tags: ['*']
workflow_dispatch:
inputs:
tag:
description: Existing tag to build and release
required: true
permissions:
contents: write
env:
LIBRARIES: ogg vorbis opus
jobs:
release:
runs-on: macos-15
timeout-minutes: 120
env:
TAG: ${{ inputs.tag || github.ref_name }}
# deployment targets for the upstream projects, see the file
XCODE_XCCONFIG_FILE: ${{ github.workspace }}/.github/deployment.xcconfig
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.TAG }}
- name: Build XCFrameworks
run: |
for lib in $LIBRARIES; do
make -C "$lib" zip
done
- name: Collect archives and checksums
run: |
mkdir -p dist
{
echo "Built from \`$(git rev-parse --short HEAD)\` with $(xcodebuild -version | head -1)."
echo
echo '| XCFramework | Checksum |'
echo '|---|---|'
} > dist/notes.md
for lib in $LIBRARIES; do
zip="$lib/build/$lib.xcframework.zip"
cp "$zip" dist/
echo "| \`$lib\` | \`$(swift package compute-checksum "$zip")\` |" >> dist/notes.md
done
cat dist/notes.md
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$TAG" dist/*.xcframework.zip \
--title "$TAG" --notes-file dist/notes.md --verify-tag