-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 2.27 KB
/
release-macos.yml
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
# This handles the building and publishing of the project's release artifacts
name: release-macos
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
strategy:
matrix:
backend: [vulkan, metal]
runs-on: macos-latest
steps:
- name: Get tag version
uses: dawidd6/action-get-tag@v1
id: tag_version
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-11-26
- name: Install cargo-bundle
uses: actions-rs/cargo@v1
with:
command: install
args: --git 'https://github.com/Kneelawk/cargo-bundle.git' --branch 'profile-option' cargo-bundle --force
- name: Build release
uses: actions-rs/cargo@v1
with:
command: bundle
args: --release --features prefer-${{ matrix.backend }}
env:
WINIT_LINK_COLORSYNC: true
- name: Create 'dist' directories
run: mkdir -p dist/bin && mkdir -p dist/app
- name: Copy release files
run: cp target/release/fractal-rs-2 dist/bin/
- name: Copy App files
run: cp -r target/release/bundle/osx/fractal-rs-2*.app dist/app/
- name: Archive release
uses: thedoctor0/zip-release@master
with:
type: 'tar'
directory: 'dist/bin/'
filename: fractal-rs-2_${{ steps.tag_version.outputs.tag }}_x86_64-macos-${{ matrix.backend }}.tgz
path: 'fractal-rs-2*'
- name: Archive release app
uses: thedoctor0/zip-release@master
with:
type: 'tar'
directory: 'dist/app/'
filename: fractal-rs-2_${{ steps.tag_version.outputs.tag }}_x86_64-macos-${{ matrix.backend }}-app.tgz
path: 'fractal-rs-2*'
- name: Publish release
uses: softprops/action-gh-release@v1
with:
body_path: changelogs/changelog-${{ steps.tag_version.outputs.tag }}.md
files: |
dist/bin/fractal-rs-2_${{ steps.tag_version.outputs.tag }}_x86_64-macos-${{ matrix.backend }}.tgz
dist/app/fractal-rs-2_${{ steps.tag_version.outputs.tag }}_x86_64-macos-${{ matrix.backend }}-app.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}