Skip to content

v1.0.0-pre

v1.0.0-pre #3

Workflow file for this run

name: Publish New Release
on:
release:
types: [created]
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v4
with:
go-version: '^1.22'
- name: make dist
run: mkdir -p dist
- name: build
run: go build -ldflags "-s -w" -o dist/ ./...
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
- name: Tar Folder
if: ${{ matrix.goos != 'windows'}}
run: tar czf ../release.tgz ./
working-directory: dist
- name: Upload To Artifactory
if: ${{ matrix.goos != 'windows'}}
run: curl --fail -i -u"${BINARY_REPOSITORY_CREDENTIALS}" -T release.tgz "${BINARY_REPOSITORY_URL}/component-builds/BricksLLM-${GIT_HASH}.tar.gz"
env:
BINARY_REPOSITORY_URL: ${{ secrets.BINARY_REPOSITORY_URL }}
GIT_HASH: ${{ github.sha }}
BINARY_REPOSITORY_CREDENTIALS: ${{ secrets.BINARY_REPOSITORY_USER }}:${{ secrets.BINARY_REPOSITORY_PASSWORD }}
- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: BricksLLM-${{ matrix.goos }}-${{ matrix.goarch }}.${{ matrix.goos == 'windows' && 'zip' || 'tgz' }}
asset_path: ${{ matrix.goos == 'windows' && 'release.zip' || 'release.tgz' }}
asset_content_type: application/octet-stream