upload: add support new signature of the run service #16
Workflow file for this run
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 Binaries | |
on: [ push ] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
os: [ ubuntu-latest, macOS-latest ] | |
architecture: [ arm64, amd64 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: sudo apt-get update -qq | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: go.mod | |
- name: Run lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
- name: Run tests | |
run: GOARCH=${{ matrix.architecture }} make test | |
build-n-publish: | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
os: [ ubuntu-latest, macOS-latest ] | |
architecture: [ arm64, amd64 ] | |
runs-on: ${{ matrix.os }} | |
if: startsWith(github.event.ref, 'refs/tags') | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get latest tag | |
id: tag | |
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV | |
- name: Install dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: sudo apt-get update -qq | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: go.mod | |
- name: Build binary | |
run: | | |
GOARCH=${{ matrix.architecture }} make build | |
mv build/qli qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} | |
- name: Generate Checksum | |
id: checksum | |
run: | | |
if [[ "${{ runner.os }}" == "macOS" ]]; then | |
shasum -a 256 qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} > qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256 | |
else | |
sha256sum qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} > qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256 | |
fi | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} | |
path: | | |
qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} | |
qli-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256 |