Skip to content

Commit 823cf56

Browse files
committed
ci(workflows): add new development build workflow
Introduces a new GitHub Actions workflow for development builds triggered on pushes to the staging branch. This workflow sets up the Go environment, runs GoReleaser for snapshot builds, and creates or updates a development release on GitHub. The workflow is designed for testing purposes and will generate a new build with each push.
1 parent a1e608e commit 823cf56

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/dev-build.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Development Build
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
paths-ignore:
8+
- '**.md'
9+
- 'docs/**'
10+
workflow_dispatch: # Allows manual triggering
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
dev-build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version: '1.23'
28+
check-latest: true
29+
30+
- name: Run GoReleaser Snapshot
31+
uses: goreleaser/goreleaser-action@v5
32+
with:
33+
distribution: goreleaser
34+
version: latest
35+
args: release --snapshot --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
CGO_ENABLED: 0 # Disable CGO for better cross-compilation compatibility
39+
40+
- name: Create/Update Development Release
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
name: Development Build
44+
tag_name: v0.0.0-dev.$(date +'%Y%m%d%H%M')
45+
files: dist/*
46+
prerelease: true
47+
body: |
48+
# Development Build
49+
50+
This is an automated development build from commit ${{ github.sha }}
51+
52+
This build is for testing purposes only and will be overwritten with each push to the main branch.
53+
generate_release_notes: false

0 commit comments

Comments
 (0)