Skip to content

update golang to 1.26.0 / alpine to 3.23.3 #129

update golang to 1.26.0 / alpine to 3.23.3

update golang to 1.26.0 / alpine to 3.23.3 #129

Workflow file for this run

name: Release
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
jobs:
logcli:
permissions:
contents: read
strategy:
matrix:
build:
- arch: amd64
runner: ubuntu-22.04
- arch: arm64
runner: ubuntu-22.04-arm
runs-on: ${{ matrix.build.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.26.0
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install -y make protobuf-compiler zip
- name: Install Go dependencies
run: |
go install github.com/golang/protobuf/protoc-gen-go@v1.3.0
go install github.com/gogo/protobuf/protoc-gen-gogoslick@v1.2.1
- name: Pre-generate code
run: make BUILD_IN_CONTAINER=false generate
- name: Build logcli
run: make BUILD_IN_CONTAINER=false logcli
- name: Zip logcli
run: zip --junk-paths logcli_${{ matrix.build.arch }}.zip cmd/logcli/logcli
- name: Upload logcli as artifact
uses: actions/upload-artifact@v4
with:
name: logcli_${{ matrix.build.arch }}
path: logcli_${{ matrix.build.arch }}.zip
retention-days: 3
release:
runs-on: ubuntu-22.04
needs: logcli
if: startsWith(github.event.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create draft release
uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/logcli_*/logcli_*.zip"
artifactErrorsFailBuild: true
bodyFile: ".github/release_template.md"
draft: true