diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e126c5c..4c0aac7d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a8a3e72..b8fa2eec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/.releaserc.json b/.releaserc.json index c771970e..c0f39008 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -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", {