Action fixes #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish pre-release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code with all commits | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
run: | | |
sudo chmod 777 /opt | |
mkdir -p /opt/go /opt/go-win7 | |
echo Installing Go | |
curl -L https://go.dev/dl/go1.24.0.linux-amd64.tar.gz -o go.tar.gz | |
tar -xzf go.tar.gz -C /opt | |
sudo ln -f -s /opt/go/bin/go /usr/bin/go | |
echo Installing Go for Windows 7 compatibility | |
curl -L https://github.com/XTLS/go-win7/releases/download/patched-1.24.0/go-for-win7-linux-amd64.zip -o go-win7.zip | |
unzip -qq go-win7.zip -d /opt/go-win7 | |
sudo ln -f -s /opt/go-win7/bin/go /usr/bin/go-win7 | |
echo Testing ... | |
ls -l /usr/bin/go* | |
ls -l /opt/go/ | |
ls -l /opt/go/bin/ | |
which go | |
which go-win7 | |
ls -l `which go` | |
ls -l `which go-win7` | |
- name: Download cyclonedx-gomod | |
uses: CycloneDX/gh-gomod-generate-sbom@v2 | |
with: | |
version: v1 | |
- name: Build | |
run: ./build.ps1 | |
shell: pwsh | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "devbuild" | |
prerelease: true | |
generate_release_notes: true | |
files: | | |
binaries/* |