-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (51 loc) · 1.49 KB
/
release.yml
File metadata and controls
66 lines (51 loc) · 1.49 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
name: Release
on:
push:
tags: ["[0-9]+.*"]
permissions:
contents: write
jobs:
build-macos:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install pkg-config libmtp
- name: Build release
run: swift build --configuration release
- name: Package
run: tar czf mtpx-macos-arm64.tar.gz -C .build/release mtpx
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mtpx-macos-arm64
path: mtpx-macos-arm64.tar.gz
build-linux:
runs-on: ubuntu-24.04
container: swift:6.2-noble
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: apt-get update && apt-get install -y libmtp-dev pkg-config
- name: Build release
run: swift build --configuration release
- name: Package
run: tar czf mtpx-linux-amd64.tar.gz -C .build/release mtpx
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mtpx-linux-amd64
path: mtpx-linux-amd64.tar.gz
release:
needs: [build-macos, build-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "${{ github.ref_name }}" artifacts/*.tar.gz --generate-notes