Skip to content

v0.4.2-testnet

v0.4.2-testnet #5

Workflow file for this run

name: Build and upload assets
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
name: Build ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '^1.23.2'
- name: Build on Linux
if: runner.os == 'Linux'
run: |
go build -v -o ./bin/ . ./proxi
archive="bin/proxima-${{ github.event.release.tag_name }}-linux.zip"
asset_name="proxima-${{ github.event.release.tag_name }}-linux.zip"
zip -r "${archive}" ./bin/*
echo "archive=${archive}" >> $GITHUB_ENV
echo "asset_name=${asset_name}" >> $GITHUB_ENV
- name: Build on Windows
if: runner.os == 'Windows'
shell: bash
run: |
go build -v -o ./bin/ . ./proxi
archive="bin/proxima-${{ github.event.release.tag_name }}-win64.zip"
asset_name="proxima-${{ github.event.release.tag_name }}-win64.zip"
powershell "Compress-Archive bin/* \"${archive}\""
echo "archive=${archive}" >> $GITHUB_ENV
echo "asset_name=${asset_name}" >> $GITHUB_ENV
- name: Build on MacOS
if: runner.os == 'macOS'
run: |
go build -v -o ./bin/ . ./proxi
archive="bin/proxima-${{ github.event.release.tag_name }}-osx.zip"
asset_name="proxima-${{ github.event.release.tag_name }}-osx.zip"
zip -r "${archive}" ./bin/*
echo "archive=${archive}" >> $GITHUB_ENV
echo "asset_name=${asset_name}" >> $GITHUB_ENV
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "./${{ env.archive }}"
asset_name: "${{ env.asset_name }}"
asset_content_type: application/zip