-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.63 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
name: Release
on:
push:
tags:
- v*.*.*
jobs:
test:
name: Test
uses: KonishchevDmitry/binup/.github/workflows/test.yml@master
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# See https://bit.ly/github-runners for actual runners
- os: ubuntu-20.04 # Oldest LTS
- os: macos-13 # Intel Mac
- os: macos-14 # ARM Mac
steps:
- uses: actions/checkout@v4
- name: Build
env:
CARGO_TERM_COLOR: always
run: cargo build --release --locked
- name: Construct archive name
id: archive_name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ format('binup-{0}-{1}-{2}.tar.bz2', runner.os, runner.arch, github.ref_name) }}
- name: Create archive
run: tar -cjf "${{ steps.archive_name.outputs.lowercase }}" -C target/release binup
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ${{ steps.archive_name.outputs.lowercase }}
if-no-files-found: error
compression-level: 0
retention-days: 1
publish:
name: Publish
needs: [test, build]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: "*"
merge-multiple: true
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: artifacts/*
file_glob: true