A macOS CLI tool that exports original photos and videos from the macOS Photos library using PhotoKit.
1name: Release
2
3on:
4 push:
5 tags:
6 - "v*"
7
8permissions:
9 contents: write
10
11jobs:
12 release:
13 runs-on: macos-latest
14 steps:
15 - uses: actions/checkout@v6
16
17 - name: Run tests
18 run: swift test 2>&1 | head -100
19
20 - name: Get version from tag
21 run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
22
23 - name: Build release binary
24 run: swift build -c release
25
26 - name: Package archive
27 run: |
28 cp .build/release/ladder ladder-aarch64-apple-darwin
29 tar czf "ladder-${VERSION}-aarch64-apple-darwin.tar.gz" ladder-aarch64-apple-darwin
30
31 - name: Generate checksums
32 run: |
33 shasum -a 256 ladder-"${VERSION}"-*.tar.gz > checksums.txt
34 cat checksums.txt
35
36 - name: Create GitHub Release
37 env:
38 GH_TOKEN: ${{ github.token }}
39 run: |
40 gh release create "$GITHUB_REF_NAME" \
41 --generate-notes \
42 ladder-"${VERSION}"-*.tar.gz \
43 checksums.txt