-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (53 loc) · 1.42 KB
/
release.yml
File metadata and controls
60 lines (53 loc) · 1.42 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: build&release binaries
on:
push:
tags:
- '*'
jobs:
release:
name: build&release
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
include:
- os: linux
arch: amd64
- os: linux
arch: arm64
- os: windows
arch: amd64
- os: darwin
arch: amd64
- os: darwin
arch: arm64
steps:
- name: checkout
uses: actions/checkout@v4
- name: go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: cli
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
BINARY_NAME="internetometer-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.os }}" = "windows" ]; then BINARY_NAME+=".exe"; fi
go build -o "dist/$BINARY_NAME" ./cmd/cli/main.go
- name: export
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
BINARY_NAME="prom-exporter-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.os }}" = "windows" ]; then BINARY_NAME+=".exe"; fi
go build -o "dist/$BINARY_NAME" ./cmd/prom/exporter.go
- name: upl release
uses: softprops/action-gh-release@v2
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}