-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (67 loc) · 2.26 KB
/
release.yml
File metadata and controls
71 lines (67 loc) · 2.26 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
name: Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build for ${{ matrix.destination.name }}
runs-on: ${{ matrix.destination.os }}
strategy:
matrix:
destination:
# - Swiftly is failing to install these so commenting out for now
# - { name: "ubuntu-aarch64", os: ubuntu-22.04-arm }
# - { name: "ubuntu-x86_64", os: ubuntu-22.04 }
- { name: "macos-universal", os: macos-15 }
steps:
- if: startsWith(matrix.destination.name, 'ubuntu')
uses: vapor/swiftly-action@v0.2
with:
toolchain: 6.1.0
- if: startsWith(matrix.destination.name, 'macos')
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- uses: actions/checkout@v4
- name: Create the binary
run: make release OUTPUT_NAME=puresql.${{ matrix.destination.name }}.tar.gz
- name: Upload the binary
uses: actions/upload-artifact@v4
with:
name: puresql.${{ matrix.destination.name }}.tar.gz
path: puresql.${{ matrix.destination.name }}.tar.gz
make-artifact-bundle:
needs: [build]
runs-on: ubuntu-latest
outputs:
checksum: ${{ steps.checksum.outputs.checksum }}
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- run: bundle/make_artifactbundle.sh ${{ github.event.release.tag_name || github.ref_name }}
- name: Upload artifact bundle
uses: actions/upload-artifact@v4
with:
name: puresql.artifactbundle.zip
path: puresql.artifactbundle.zip
- name: Compute checksum
id: checksum
run: echo "checksum=$(swift package compute-checksum puresql.artifactbundle.zip)" >> "$GITHUB_OUTPUT"
deploy-binary:
# if: ${{ github.event_name == 'release' }}
needs: [make-artifact-bundle]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Deploy the binary
uses: softprops/action-gh-release@v2
with:
files: |
puresql.ubuntu-x86_64.tar.gz
puresql.ubuntu-aarch64.tar.gz
puresql.macos-universal.tar.gz
puresql.artifactbundle.zip