-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.53 KB
/
release-artifact.yaml
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
name: Release Artifact
on:
push:
tags:
- '*.*.*'
jobs:
release:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
ARTIFACT_BUNDLE: "LicensePlistsMerger.artifactbundle"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show Xcode Version
run: xcodebuild -version
- name: Build
run: swift build -c release --product license-plists-merger --arch arm64 --arch x86_64
- name: Set env
run: echo "ARTIFACT_BUNDLE_PATH"=${ARTIFACT_BUNDLE}/license-plists-merger-${{ github.ref_name }}-macos/bin >> $GITHUB_ENV
- name: Create Artifact Bundle
run: |
mkdir -p "${ARTIFACT_BUNDLE_PATH}"
sed "s/__VERSION__/${{ github.ref_name }}/g" info.json.template > "${ARTIFACT_BUNDLE}/info.json"
cp -f .build/apple/Products/Release/license-plists-merger "${ARTIFACT_BUNDLE_PATH}""
cp -f LICENSE "${ARTIFACT_BUNDLE_PATH}"
zip -yr - "${ARTIFACT_BUNDLE}" > "./license-plists-merger-macos.artifactbundle.zip"
- name: Compute Checksum
run: |
CHECKSUM=$(swift package compute-checksum ./license-plists-merger-macos.artifactbundle.zip)
echo $CHECKSUM
echo "CHECKSUM=${CHECKSUM}" >> $GITHUB_ENV
- name: Create release
run: |
gh release create "${{ github.ref_name}}" "./license-plists-merger-macos.artifactbundle.zip" -t "${{ github.ref_name }}" -n "**checksum**: ${{ env.CHECKSUM }}"