Skip to content

Commit

Permalink
fix: test executable flows for githubrelease (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike authored Feb 9, 2024
1 parent dba0b36 commit b1d5dcf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -68,20 +66,6 @@ jobs:
- name: build go
if: ${{ matrix.os != 'windows-2019' }}
run: go build -o rpc ./cmd

- name: Upload RPC Executable (Windows)
uses: actions/upload-artifact@v2
if: contains(matrix.os, 'windows') && github.event_name == 'release' && github.event.action == 'created'
with:
name: rpc_executable-${{ matrix.os }}
path: ./rpc.exe

- name: Upload RPC Executable (Linux)
uses: actions/upload-artifact@v2
if: contains(matrix.os, 'ubuntu') && github.event_name == 'release' && github.event.action == 'created'
with:
name: rpc_executable-${{ matrix.os }}
path: ./rpc

- name: GitHub Upload Release Artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
logout: true

- name: Build for Linux x64
run: GOOS=linux GOARCH=amd64 go build -o rpc_linux_x64 ./cmd

- name: Build for Linux x86
run: GOOS=linux GOARCH=386 go build -o rpc_linux_x86 ./cmd

- name: Build for Windows x64
run: GOOS=windows GOARCH=amd64 go build -o rpc_windows_x64.exe ./cmd/main.go

- name: Build for Windows x86
run: GOOS=windows GOARCH=386 go build -o rpc_windows_x86.exe ./cmd/main.go

- name: Semantic Release
uses: cycjimmy/semantic-release-action@61680d0e9b02ff86f5648ade99e01be17f0260a4 # v4.0.0
with:
Expand Down
24 changes: 23 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,29 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/github",
{
"assets": [
{
"path": "rpc_linux_x64",
"label": "Linux x64 RPC Executable"
},
{
"path": "rpc_linux_x86",
"label": "Linux x86 RPC Executable"
},
{
"path": "rpc_windows_x64.exe",
"label": "Windows x64 RPC Executable"
},
{
"path": "rpc_windows_x86.exe",
"label": "Windows x86 RPC Executable"
}
]
}
],
[
"@semantic-release/exec",
{
Expand Down

0 comments on commit b1d5dcf

Please sign in to comment.