-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (79 loc) · 2.76 KB
/
release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Release
on:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+*']
jobs:
linux:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install dependencies on Ubuntu
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- name: Build
run: GIT_COMMIT_HASH=$(git rev-parse --short HEAD) cargo build --release
- name: Gzip
run: |
mkdir ppd-editor
mv ./target/release/ppd-editor ppd-editor/
tar -zcvf ./ppd-editor-linux-${{ github.ref_name }}.tar.gz ppd-editor
mkdir ppd-viewer
mv ./target/release/ppd-viewer ppd-viewer/
tar -zcvf ./ppd-viewer-linux-${{ github.ref_name }}.tar.gz ppd-viewer
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./ppd-editor-linux-${{ github.ref_name }}.tar.gz
./ppd-viewer-linux-${{ github.ref_name }}.tar.gz
macos:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: cargo install cargo-bundle
- name: Bundle
run: |
cargo bundle --release --bin ppd-editor
cargo bundle --release --bin ppd-viewer
- name: Gzip
run: |
mkdir ppd-editor
mv ./target/release/bundle/osx/PpdEditor.app ppd-editor/
tar -zcvf ./ppd-editor-macos-${{ github.ref_name }}.tar.gz ppd-editor
mkdir ppd-viewer
mv ./target/release/bundle/osx/PpdViewer.app ppd-viewer/
tar -zcvf ./ppd-viewer-macos-${{ github.ref_name }}.tar.gz ppd-viewer
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./ppd-editor-macos-${{ github.ref_name }}.tar.gz
./ppd-viewer-macos-${{ github.ref_name }}.tar.gz
windows:
runs-on: windows-latest
defaults:
run:
shell: bash
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Build
run: GIT_COMMIT_HASH=$(git rev-parse --short HEAD) cargo build --release
- name: Install WiX
run: nuget install WiX -Version 3.11.2
- name: Create msi installer
run: |
./WiX.*/tools/candle.exe -arch "x64" -ext WixUIExtension -ext WixUtilExtension \
-out "./ppd-editor.wixobj" "build/windows/wix/ppd-editor.wxs"
./WiX.*/tools/light.exe -ext WixUIExtension -ext WixUtilExtension \
-out "./ppd-editor-windows-${{ github.ref_name }}.msi" -sice:ICE61 -sice:ICE91 \
"./ppd-editor.wixobj"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./ppd-editor-windows-${{ github.ref_name }}.msi