Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test executable flows for githubrelease #377

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading