-
Notifications
You must be signed in to change notification settings - Fork 312
93 lines (84 loc) · 2.78 KB
/
ios.yml
File metadata and controls
93 lines (84 loc) · 2.78 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: FluidSynth iOS
on:
pull_request:
push:
paths-ignore:
- '.azure/**'
- '.circleci/**'
- '.github/workflows/linux.yml'
- '.github/workflows/solaris.yml'
- '.github/workflows/windows.yml'
- '.github/workflows/sonarcloud.yml'
- '.cirrus.yml'
- 'README.md'
release:
types: [published]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
INSTALL_LOCATION: ${{github.workspace}}/fluidsynth_install
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
defaults:
run:
shell: bash
jobs:
ios-build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest
outputs:
artifact_name: ${{ steps.artifact_name.outputs.name }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Build
run: bash contrib/ios_build.sh
- name: Set artifact name
shell: bash
id: artifact_name
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "name=fluidsynth-${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "name=fluidsynth-${{ github.run_id }}" >> $GITHUB_OUTPUT
fi
mkdir publish
ls -la .
cp -r build/FluidSynth.xcframework publish/
ls -la publish
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact_name.outputs.name }}-iOS
path: publish/
retention-days: 14
overwrite: true
# Publish artifacts to GitHub releases (only on release events)
publish-release-ios:
if: github.event_name == 'release' && github.event.action == 'published'
needs:
- ios-build
runs-on: ubuntu-latest
name: 🚀 Publish Release Artifacts
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: ${{ needs.ios-build.outputs.artifact_name }}-iOS
pattern: ${{ needs.ios-build.outputs.artifact_name }}-iOS
merge-multiple: false
- name: Create release archives
run: |
ls -la
zip -r "${{ needs.ios-build.outputs.artifact_name }}-iOS.zip" "${{ needs.ios-build.outputs.artifact_name }}-iOS"
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}