Skip to content

Commit 5bd9963

Browse files
committed
fix: go and releasing update
1 parent 24aeefe commit 5bd9963

4 files changed

Lines changed: 73 additions & 51 deletions

File tree

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.25'
18+
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.14'
22+
23+
- uses: pre-commit/action@v3.0.1
24+
env:
25+
SKIP: "no-commit-to-branch"
26+
27+
semantic-release:
28+
runs-on: ubuntu-latest
29+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
30+
needs:
31+
- pre-commit
32+
steps:
33+
- uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
36+
37+
- id: generate_token
38+
uses: actions/create-github-app-token@v1
39+
with:
40+
app-id: ${{ secrets.CICD_APP_ID }}
41+
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
42+
43+
- name: Semantic Release
44+
uses: cycjimmy/semantic-release-action@v3
45+
env:
46+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
47+
48+
release-binary:
49+
runs-on: ubuntu-latest
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
51+
needs:
52+
- pre-commit
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- id: generate_token
57+
uses: actions/create-github-app-token@v1
58+
with:
59+
app-id: ${{ secrets.CICD_APP_ID }}
60+
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
61+
62+
- uses: actions/setup-go@v5
63+
with:
64+
go-version: '1.25'
65+
66+
- uses: goreleaser/goreleaser-action@v6
67+
with:
68+
distribution: goreleaser
69+
version: latest
70+
args: release --clean
71+
env:
72+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"

.github/workflows/release.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/semantic-release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/rwxd/vmrss
22

3-
go 1.20
3+
go 1.25

0 commit comments

Comments
 (0)