Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d19891e

Browse files
committedSep 15, 2024
Add workflow for GHA
1 parent 5c8ba17 commit d19891e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
 

‎.github/workflows/build.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build
2+
run-name: "${{ inputs.releaseVersion }}"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
inputs:
13+
releaseVersion:
14+
type: string
15+
description: Version to release
16+
required: true
17+
18+
permissions:
19+
contents: write
20+
21+
jobs:
22+
goreleaser:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v5
32+
go-version: '1.23'
33+
34+
- name: Run GoReleaser
35+
if: github.event_name == 'workflow_dispatch'
36+
uses: goreleaser/goreleaser-action@v6
37+
with:
38+
distribution: goreleaser
39+
version: '~> v2'
40+
args: release --clean
41+
workdir: .build
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Upload assets
46+
if: github.event_name == 'workflow_dispatch'
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: ez-ipam
50+
path: .build/dist/*

0 commit comments

Comments
 (0)
Please sign in to comment.