-
Notifications
You must be signed in to change notification settings - Fork 88
74 lines (63 loc) · 1.92 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
name: release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: beerus-linux-x86_64.tar.gz
asset_name: beerus-linux-x86_64.tar.gz
## TODO: decide to keep or drop darwin support
# - os: macos-latest
# artifact_name: beerus-darwin-x86_64.tar.gz
# asset_name: beerus-darwin-x86_64.tar.gz
container:
image: ${{ matrix.container || '' }}
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: cache deps
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: build
run: cargo build --release
- name: create tarball
run: tar -C target/release -czvf ${{ matrix.artifact_name }} beerus
- name: upload release binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
docker-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup docker build
uses: docker/setup-buildx-action@v2
- name: login to docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push docker image ghcr
uses: docker/build-push-action@v4
with:
push: true
tags: >
ghcr.io/${{ github.repository }}:latest,
ghcr.io/${{ github.repository }}:${{ github.ref_name }}