File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed
Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+ on : [push]
3+ jobs :
4+ build :
5+ strategy :
6+ fail-fast : false
7+ matrix :
8+ include :
9+ - arch : x86_64
10+ - arch : arm64
11+ runs-on : macos-13
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+ - name : Build
16+ run : ./build.sh ${{ matrix.arch }}
17+ - name : Archive binary
18+ uses : actions/upload-artifact@v3
19+ with :
20+ name : dockutil-${{ matrix.arch }}
21+ path : |
22+ .build/dockutil-${{ matrix.arch }}.tar.gz
23+ release :
24+ if : startsWith(github.ref, 'refs/tags/v')
25+ runs-on : ubuntu-22.04
26+ needs :
27+ - build
28+ permissions :
29+ contents : write
30+ steps :
31+ - name : Download artifacts
32+ uses : actions/download-artifact@v3
33+ - name : Release
34+ uses : ncipollo/release-action@v1
35+ with :
36+ token : ${{ secrets.GITHUB_TOKEN }}
37+ draft : true
38+ artifacts : |
39+ .build/*.tar.gz
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -euo pipefail
23
3- swift build -c release
4+ ARCH=" ${1:- x86_64} "
5+
6+ # build.
7+ swift build \
8+ --arch " $ARCH " \
9+ --configuration release
10+
11+ # package.
12+ rm -f " .build/dockutil-$ARCH .tar.gz"
13+ tar czf " .build/dockutil-$ARCH .tar.gz" \
14+ -C " .build/$ARCH -apple-macosx/release" \
15+ dockutil
You can’t perform that action at this time.
0 commit comments