Skip to content

Bump golang.org/x/net from 0.35.0 to 0.36.0 #100

Bump golang.org/x/net from 0.35.0 to 0.36.0

Bump golang.org/x/net from 0.35.0 to 0.36.0 #100

Workflow file for this run

name: Cross Platform build
on: [push, pull_request]
env:
GOVERSION: '1.24'
jobs:
build_linux:
runs-on: ubuntu-24.04
strategy:
matrix:
version: ['linux-armhf', 'linux-arm64', 'linux-i386', 'linux-amd64']
include:
# add the GO naming convention for OS ($GOOS) and architecture ($GOARCH)
# instead of using Linux' naming convention (version items).
- version: linux-armhf
OS: linux
ARCH: arm
- version: linux-arm64
OS: linux
ARCH: arm64
- version: linux-i386
OS: linux
ARCH: '386'
- version: linux-amd64
OS: linux
ARCH: amd64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go $GOVERSION
uses: actions/setup-go@v5
id: go
with:
go-version: ${{ env.GOVERSION }}
- name: Build binary for ${{ matrix.version }}
run: |
docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp dh1tw/remoteaudio-xcompile:${{ matrix.version }} /bin/sh -c 'git config --global --add safe.directory /usr/src/myapp && make dist'
- name: Prepare build artifact for stashing
run: |
mkdir release
mv ./remoteAudio ./release
# The build artifact can be identified by the trailing sha of the git commit
- name: Stash the build artifact
uses: actions/upload-artifact@v4
with:
name: remoteAudio-${{ matrix.OS }}-${{ matrix.ARCH }}-${{ github.sha }}
path: ./release
build_macos:
runs-on: macos-latest
strategy:
matrix:
version: ['darwin-amd64', 'darwin-arm64']
include:
- version: darwin-amd64
OS: darwin
ARCH: amd64
- version: darwin-arm64
OS: darwin
ARCH: arm64
steps:
- name: Set up Go $GOVERSION
uses: actions/setup-go@v5
id: go
with:
go-version: ${{ env.GOVERSION }}
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
brew install pkg-config
brew install opus
brew install opusfile
brew install portaudio
brew install protobuf
brew install libsamplerate
brew install upx
- name: Install code generators
run: make install-deps
- name: Build binary for macOS
run: |
export PATH=/System/Volumes/Data/Users/runner/go/bin:$PATH
make dist
- name: Prepare build artifact for stashing
run: |
mkdir release
mv ./remoteAudio ./release
# The build artifact can be identified by the trailing sha of the git commit
- name: Stash the build artifact
uses: actions/upload-artifact@v4
with:
name: remoteAudio-${{ matrix.OS }}-${{ matrix.ARCH }}-${{ github.sha }}
path: ./release
build_windows:
runs-on: ubuntu-24.04
strategy:
matrix:
version: ['windows-amd64', 'windows-i386']
include:
# add the GO naming convention for OS ($GOOS) and architecture ($GOARCH)
# instead of using Linux' naming convention (version items).
- version: windows-amd64
OS: windows
ARCH: amd64
- version: windows-i386
OS: windows
ARCH: '386'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go $GOVERSION
uses: actions/setup-go@v5
id: go
with:
go-version: ${{ env.GOVERSION }}
- name: Build binary for ${{ matrix.version }}
run: |
git config --global --add safe.directory /usr/src/myapp
docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp dh1tw/remoteaudio-xcompile:${{ matrix.version }} /bin/sh -c 'git config --global --add safe.directory /usr/src/myapp && make dist && /scripts/getlibs.sh .'
- name: Prepare build artifacts for stashing
run: |
mkdir release
mv ./remoteAudio.exe ./release
mv ./*.dll ./release
# The build artifact can be identified by the trailing sha of the git commit
- name: Stash the build artifact
uses: actions/upload-artifact@v4
with:
name: remoteAudio-${{ matrix.OS }}-${{ matrix.ARCH }}-${{ github.sha }}
path: ./release
# In this job we upload the release artifacts to the corresponding release
create_release_and_upload:
runs-on: ubuntu-24.04
needs: [build_linux, build_macos, build_windows]
if: startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
version: ['linux-armhf', 'linux-arm64', 'linux-i386', 'linux-amd64', 'darwin-amd64', 'darwin-arm64', 'windows-amd64', 'windows-i386']
# add the GO naming convention for OS ($GOOS) and architecture ($GOARCH)
# instead of using Linux' naming convention (version items).
include:
- version: linux-armhf
OS: linux
ARCH: arm
- version: linux-arm64
OS: linux
ARCH: arm64
- version: linux-i386
OS: linux
ARCH: '386'
- version: linux-amd64
OS: linux
ARCH: amd64
- version: darwin-amd64
OS: darwin
ARCH: amd64
- version: darwin-arm64
OS: darwin
ARCH: arm64
- version: windows-amd64
OS: windows
ARCH: amd64
- version: windows-i386
OS: windows
ARCH: '386'
steps:
# Since Github actions (currently) doesn't provide a slugged version of the git tag we have to
# create it by ourselves. It is then made available to other steps in this job as a step.outputs
# variable
- name: Get the version (git tag)
id: get_version
run: |
echo ${GITHUB_REF/refs\/tags\//}
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
- name: Retrieve stashed intermediary build artifact
uses: actions/download-artifact@v4
with:
name: remoteAudio-${{ matrix.OS }}-${{ matrix.ARCH }}-${{ github.sha }}
# rename the retrieved intermediary artifact and prepare zip file
- name: Display current directory
run: pwd
- name: Display structure of downloaded files
run: ls -R
- name: Prepare release artifact
run: |
test -f ./remoteAudio && chmod +x ./remoteAudio #only on linux & darwin needed
zip -j remoteAudio-${{ env.VERSION_TAG }}-${{ matrix.OS }}-${{ matrix.ARCH }}.zip ./*
- name: Sleep to avoid multiple releases with the same tag
run: |
RANDOM_DELAY=$(( ( RANDOM % 60 ) + 1 ))
sleep $RANDOM_DELAY
# Finally upload the artifact to the corresponding release
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ env.VERSION_TAG }}
draft: true
prerelease: false
files: |
./remoteAudio-${{ env.VERSION_TAG }}-${{ matrix.OS }}-${{ matrix.ARCH }}.zip