-
-
Notifications
You must be signed in to change notification settings - Fork 10
127 lines (116 loc) · 7.28 KB
/
publish.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Publish builds
on:
push:
branches:
- main
paths-ignore:
- "**/README.md"
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
publish:
name: Publish Builds
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
release_suffix: ubuntu
- os: macos-latest
release_suffix: mac
- os: windows-latest
release_suffix: windows
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install build-essential librust-atk-sys-dev libgtk-3-dev \
gcc-multilib libpq-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libasound2-dev portaudio19-dev libpulse-dev libdbus-1-dev libudev-dev protobuf-compiler
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Publish Console for Mac & Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/console
asset_name: gamercade_console-${{ matrix.release_suffix }}
asset_content_type: application/zip # required by GitHub API
- name: Publish Console for Windows
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/console.exe
asset_name: gamercade_console-${{ matrix.release_suffix }}.exe
asset_content_type: application/zip # required by GitHub API
- name: Publish Editor for Mac & Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/editor
asset_name: gamercade_editor-${{ matrix.release_suffix }}
asset_content_type: application/zip # required by GitHub API
- name: Publish Editor for Windows
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/editor.exe
asset_name: gamercade_editor-${{ matrix.release_suffix }}.exe
asset_content_type: application/zip # required by GitHub API
- name: Publish gccl for Mac & Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/gccl
asset_name: gccl-${{ matrix.release_suffix }}
asset_content_type: application/zip # required by GitHub API
- name: Publish gccl for Windows
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/gccl.exe
asset_name: gccl-${{ matrix.release_suffix }}.exe
asset_content_type: application/zip # required by GitHub API
- name: Publish App for Mac & Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/app
asset_name: gamercade_app-${{ matrix.release_suffix }}
asset_content_type: application/zip # required by GitHub API
- name: Publish App for Windows
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v1.1.0
with:
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases)
asset_path: ./target/release/app.exe
asset_name: gamercade_app-${{ matrix.release_suffix }}.exe
asset_content_type: application/zip # required by GitHub API