Skip to content

Commit f3c8231

Browse files
authored
feat: Update build process and add release candidate tagging (#10)
* ci: Update workflow name and conditions * feat: Add workflow for building and testing on develop branch * feat: Update build process and add release candidate tagging
1 parent 421ad7d commit f3c8231

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/develop.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,33 @@ jobs:
3838
GOOS: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
3939
GOARCH: amd64
4040
run: |
41-
go build -o netstats-${GOOS}-${GOARCH}
41+
go build -o gonet-${GOOS}-${GOARCH}
4242
4343
- name: Upload Build Artifact
4444
uses: actions/upload-artifact@v3
4545
with:
46-
name: netstats-${GOOS}-${GOARCH}
47-
path: netstats-${GOOS}-${GOARCH}
46+
name: gonet-${GOOS}-${GOARCH}
47+
path: gonet-${GOOS}-${GOARCH}
4848

4949
- name: Run Tests
5050
run: |
5151
go test ./... -v
52+
53+
- name: Create Release Candidate Tag
54+
run: |
55+
TAG_NAME="gonet-rc-${{ github.run_number }}"
56+
git config user.name "github-actions"
57+
git config user.email "[email protected]"
58+
git tag $TAG_NAME
59+
git push origin $TAG_NAME
60+
61+
- name: Create GitHub Release
62+
uses: softprops/action-gh-release@v1
63+
with:
64+
tag_name: "gonet-rc-${{ github.run_number }}"
65+
name: "Release Candidate gonet-rc-${{ github.run_number }}"
66+
files: |
67+
gonet-linux-amd64
68+
gonet-darwin-amd64
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)