forked from synthparadox/EggLedger
-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (84 loc) · 2.43 KB
/
create-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
87
88
89
90
91
92
93
94
95
name: Create release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: false
build_release:
name: Build Release
needs: create_release
strategy:
matrix:
target: [linux, mac, mac-arm64 , windows]
include:
- target: linux
os: ubuntu-latest
- target: mac
os: macos-latest
- target: mac-arm64
os: macos-latest
- target: windows
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Linux build dependencies
if: matrix.target == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler protoc-gen-go dos2unix
- name: Run Linux Build
if: matrix.target == 'linux'
run: make dist-linux
- name: Install Macos build dependencies
if: matrix.os == 'macos-latest'
run: |
brew update
brew install protobuf protoc-gen-go dos2unix
- name: Run Mac x86 Build
if: matrix.target == 'mac'
run: make dist-mac
- name: Run Mac ARM Build
if: matrix.target == 'mac-arm64'
run: make dist-mac-arm
- name: Install Windows build dependencies
if: matrix.target == 'windows'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler protoc-gen-go gcc-mingw-w64 dos2unix
- name: Run Windows Build
if: matrix.target == 'windows'
run: make dist-windows
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
files: |
dist/EggLedger-mac.zip
dist/EggLedger-mac-arm64.zip
dist/EggLedger-linux.tar.gz
dist/EggLedger-windows.zip
dist/EggLedger.exe