forked from eigerco/beerus
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.75 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
---
name: release
on:
push:
tags:
- '*'
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
- os: macos-latest
artifact_name: beerus-darwin-x86_64.tar.gz
asset_name: beerus-darwin-x86_64.tar.gz
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install Toolchain
run: |
rustup set profile minimal
rustup update --no-self-update stable
- 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 beerus-rpc
- name: Upload binaries to release
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
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
with:
push: true
tags: >
ghcr.io/${{ github.repository }}:latest,
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}