Skip to content

Commit 5b41e19

Browse files
committed
Update release.yml
1 parent 4ec48af commit 5b41e19

File tree

2 files changed

+44
-22
lines changed

2 files changed

+44
-22
lines changed

.github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*.*.*
7+
8+
jobs:
9+
release:
10+
runs-on: macos-15
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Setup Xcode
14+
uses: maxim-lobanov/setup-xcode@v1
15+
with:
16+
xcode-version: '16.1'
17+
- name: Build executable for release
18+
run: swift build -c release --arch arm64 --arch x86_64 --product swift-pd-guess
19+
- name: Compress archive
20+
run: tar -czf swift-pd-guess-${{ github.ref_name }}.tar.gz -C .build/apple/Products/Release swift-pd-guess
21+
- name: Release
22+
uses: softprops/action-gh-release@v2
23+
with:
24+
files: ${{ github.ref_name }}.tar.gz
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Compute Checksum
27+
id: checksum
28+
run: |
29+
echo "md5=$(md5 -q ./swift-pd-guess-${{ github.ref_name }}.tar.gz)" >> $GITHUB_OUTPUT
30+
echo "xcode_path=$(xcrun xcode-select --print-path)" >> $GITHUB_OUTPUT
31+
- name: Create Release
32+
id: create_release
33+
uses: ncipollo/release-action@v1
34+
with:
35+
body: |
36+
Build Xcode version ${{ steps.checksum.outputs.xcode_path }}
37+
| Name | MD5 |
38+
|----------------------------------------------|--------------------------------------------|
39+
| swift-pd-guess-${{ github.ref_name }}.tar.gz | ${{ steps.checksum.outputs.md5 }} |
40+
allowUpdates: true
41+
artifacts: swift-pd-guess-${{ github.ref_name }}.tar.gz
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
44+

.github/workflows/release.yml.yml

-22
This file was deleted.

0 commit comments

Comments
 (0)