-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (34 loc) · 1005 Bytes
/
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
on:
push:
tags:
- 'v*'
name: Release
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build x86_64 binary
run: |
docker build -t nmc:amd64 --platform linux/amd64 .
container_id=$(docker create nmc:amd64 --entrypoint /)
docker cp $container_id:/target/release/nmc nmc-linux-x86_64
- name: Build aarch64 binary
run: |
docker build -t nmc:arm64 --platform linux/arm64 .
container_id=$(docker create nmc:arm64 --entrypoint /)
docker cp $container_id:/target/release/nmc nmc-linux-aarch64
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
nmc-linux-aarch64
nmc-linux-x86_64