Skip to content

Commit 09beeab

Browse files
authored
Update portage.yml
1 parent 8612709 commit 09beeab

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

.github/workflows/portage.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
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
52

63
on:
74
push:
8-
branches: [ "main" ]
5+
branches: [ main ]
96

107
jobs:
11-
128
build:
139
runs-on: ubuntu-latest
1410
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
2122

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 }}

0 commit comments

Comments
 (0)