Skip to content

Commit cc8579e

Browse files
committed
build and release
1 parent ec65507 commit cc8579e

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/release.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
goos: [linux, darwin, windows]
15+
goarch: [amd64, arm64]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version-file: go.mod
25+
26+
- name: Build
27+
run: |
28+
mkdir -p dist
29+
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/gitlab-migrator-${{ matrix.goos }}-${{ matrix.goarch }}
30+
31+
- name: Upload binaries
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: gitlab-migrator-${{ matrix.goos }}-${{ matrix.goarch }}
35+
path: dist/gitlab-migrator-${{ matrix.goos }}-${{ matrix.goarch }}
36+
37+
release:
38+
runs-on: ubuntu-latest
39+
needs: build
40+
41+
steps:
42+
- name: Download binaries
43+
uses: actions/download-artifact@v4
44+
with:
45+
path: ./dist
46+
47+
- name: Release
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
files: ./dist/*
51+
52+
53+
# vim: set ts=2 sts=2 sw=2 et:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
dist/
12
gitlab-migrator
23
*.csv

0 commit comments

Comments
 (0)