File tree Expand file tree Collapse file tree 1 file changed +28
-14
lines changed Expand file tree Collapse file tree 1 file changed +28
-14
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will build a golang project
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
-
4
- name : Portage
1
+ name : Build and Release Portage
5
2
6
3
on :
7
4
push :
8
- branches : [ " main" ]
5
+ branches : [ main ]
9
6
10
7
jobs :
11
-
12
8
build :
13
9
runs-on : ubuntu-latest
14
10
steps :
15
- - uses : actions/checkout@v4
16
-
17
- - name : Set up Go
18
- uses : actions/setup-go@v4
19
- with :
20
- go-version : ' 1.22'
11
+ - uses : actions/checkout@v2
12
+ - name : Install Go (replace with your specific version if needed)
13
+ uses : actions/setup-go@v2
14
+ with :
15
+ go-version : ' 1.22'
16
+ - name : Build portage
17
+ run : go build -o portage main.go # Replace with your build command and output path
18
+ - uses : actions/upload-artifact@v2
19
+ with :
20
+ name : go-app-artifact
21
+ path : ./portage # Replace with your output binary path
21
22
22
- - name : Build
23
- run : go build main.go
23
+ release :
24
+ needs : build
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : git@v4
28
+ name : Get commit message
29
+ - id : get_message
30
+ run : |
31
+ git log --pretty=%B -1
32
+ - uses : softprops/action-gh-release@v1
33
+ with :
34
+ tag_name : ${{ github.ref }}
35
+ name : New Release ${{ github.ref }}
36
+ body : ${{ steps.get_message.outputs }}
37
+ files : ./portage@${{ github.run_id }}
You can’t perform that action at this time.
0 commit comments