Skip to content

Commit bd663de

Browse files
committed
ci: add release workflow
1 parent 8f5ef3f commit bd663de

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

.github/workflows/binaries.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Publish Binaries 🛠️
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
- main
12+
13+
permissions:
14+
id-token: write
15+
contents: write
16+
packages: write
17+
18+
concurrency:
19+
group: binaries-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- run: uname -s
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y build-essential clang-tools-14 git libssl-dev pkg-config protobuf-compiler libudev-dev
33+
sudo apt-get clean
34+
- name: Setup Go 1.24
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: 1.24
38+
- name: Setup rust 1.85.1
39+
uses: actions-rust-lang/setup-rust-toolchain@v1
40+
- name: Build
41+
run: make
42+
- name: Release
43+
uses: softprops/action-gh-release@v2
44+
if: github.ref_type == 'tag'
45+
with:
46+
files: migrate-masp-events
47+
draft: true

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
branches:
1212
- main
1313

14+
concurrency:
15+
group: docker-${{ github.ref }}
16+
cancel-in-progress: true
17+
1418
permissions:
1519
id-token: write
1620
contents: write

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BIN := migrate-masp-events
22
RUSTLIB := libparse.a
33

4-
OS := $(uname -s)
4+
OS := $(shell uname -s)
55

66
.PHONY: all
77
all: $(BIN)
@@ -22,7 +22,7 @@ fmt:
2222
go fmt github.com/heliaxdev/migrate-masp-events/proto/types
2323

2424
$(BIN): $(RUSTLIB)
25-
ifeq ($(SPECIAL),"Linux")
25+
ifeq ($(OS),Linux)
2626
env CGO_ENABLED=1 CGO_LDFLAGS=-lm go build
2727
else
2828
env CGO_ENABLED=1 go build

0 commit comments

Comments
 (0)