-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.42 KB
/
binaries.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
# This file is part of the rust-for-it project.
#
# Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org>
# SPDX-License-Identifier: MIT
name: Build release binaries
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
release_binaries:
name: Build release binaries
strategy:
fail-fast: false
matrix:
runs-on: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build
run: |-
set -x
rustc --version --verbose
cargo build --release
mv -v target/release/rust-for-it* .
rm rust-for-it.d # to not go into artifact zip file
- name: Install UPX (macOS)
if: runner.os == 'macOS'
run: |-
brew install upx
- name: Compress binary using UPX (Linux or macOS)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |-
upx --best --no-lzma ./rust-for-it
- name: Store binary
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: rust-for-it_${{ matrix.runs-on }}_${{ github.sha }}
path: |
LICENSE
rust-for-it*
if-no-files-found: error