-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (93 loc) · 3.38 KB
/
Copy pathrelease.yml
File metadata and controls
106 lines (93 loc) · 3.38 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Release
permissions:
contents: write
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
name: Build ${{ matrix.target.name }} package
runs-on: ${{ matrix.target.os }}
strategy:
matrix:
target:
[
{ name: aarch64-apple-darwin, os: macos-latest }
# { name: x86_64-unknown-linux-gnu, os: ubuntu-latest },
# { name: x86_64-pc-windows-msvc, os: windows-latest },
]
steps:
- name: Fetch latest code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
with:
cache: true
components: rustfmt, clippy
- name: Bundle and Pack (macOS app)
if: matrix.target.os == 'macos-latest'
run: |
VOXIT_NATIVE_HOST_RUST_PROFILE=final-release \
VOXIT_NATIVE_HOST_SWIFT_CONFIGURATION=release \
VOXIT_NATIVE_HOST_LOCKED=1 \
VOXIT_NATIVE_HOST_SIGN_IDENTITY=- \
./scripts/build_and_run.sh stage
COMMON_ROOT="$(cd "$(git rev-parse --git-common-dir)/.." && pwd)"
APP_PATH="$COMMON_ROOT/target/voxit-native-host/Voxit.app"
if [ ! -d "$APP_PATH" ]; then
echo "Could not locate Voxit.app at $APP_PATH"
exit 1
fi
cp -R "$APP_PATH" .
zip -r "voxit-${{ matrix.target.name }}.zip" Voxit.app
rm -rf Voxit.app
# - name: Pack (Windows)
# if: matrix.target.os == 'windows-latest'
# run: |
# mv target/${{ matrix.target.name }}/final-release/name_placeholder.exe .
# Compress-Archive -Path name_placeholder.exe -DestinationPath name_placeholder-${{ matrix.target.name }}.zip
#
# - name: Pack (Linux)
# if: matrix.target.os == 'ubuntu-latest'
# run: |
# mv target/${{ matrix.target.name }}/final-release/name_placeholder .
# tar -czvf name_placeholder-${{ matrix.target.name }}.tar.gz name_placeholder
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: voxit-${{ matrix.target.name }}
path: voxit-${{ matrix.target.name }}.zip
retention-days: 1
# release:
# name: Release
# runs-on: ubuntu-latest
# steps:
# - name: Publish
# uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
# with:
# discussion_category_name: Announcements
# generate_release_notes: true
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
merge-multiple: true
- name: Publish
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
discussion_category_name: Announcements
generate_release_notes: true
files: artifacts/*