-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.62 KB
/
release.yml
File metadata and controls
46 lines (44 loc) · 1.62 KB
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
name: release
on:
push:
tags: ["v*"]
jobs:
binaries:
name: build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: macos-latest, target: aarch64-apple-darwin }
steps:
- uses: actions/checkout@v4
- name: Install deps (linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev cmake clang
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release --bin gpp --bin gpp-relay
- name: Package
run: |
tar -C target/release -czf gpp-${{ matrix.target }}.tar.gz gpp gpp-relay
- uses: softprops/action-gh-release@v2
with:
files: gpp-${{ matrix.target }}.tar.gz
images:
runs-on: ubuntu-latest
permissions: { packages: write, contents: read }
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: gpp image
run: |
docker build -f deploy/gpp/Dockerfile -t ghcr.io/${{ github.repository_owner }}/gpp:${{ github.ref_name }} .
docker push ghcr.io/${{ github.repository_owner }}/gpp:${{ github.ref_name }}
- name: gpp-relay image
run: |
docker build -f deploy/relay/Dockerfile -t ghcr.io/${{ github.repository_owner }}/gpp-relay:${{ github.ref_name }} .
docker push ghcr.io/${{ github.repository_owner }}/gpp-relay:${{ github.ref_name }}