Skip to content

Go

Go #7

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
tags:
- v_**
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build Linux amd64
run: GOOS=linux GOARCH=amd64 go build -o lsp_linux-amd64
- name: Build Windows amd64
run: GOOS=windows GOARCH=amd64 go build -o lsp_windows-amd64.exe
- name: Create Github Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: lsp - Release ${{ github.ref }}
generate_release_notes: true
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["lsp_*"]'