Skip to content

merge(fetch): Merge pull request #36 from genshen/fix-git-fetch-ref-n… #82

merge(fetch): Merge pull request #36 from genshen/fix-git-fetch-ref-n…

merge(fetch): Merge pull request #36 from genshen/fix-git-fetch-ref-n… #82

# on:
# push:
# tags:
# - 'v*'
on: [push]
name: Build&Release
jobs:
build:
name: Build release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Get Go dependencies
run: go mod download
- name: Build
run: make
- uses: actions/upload-artifact@v4
with:
name: build-artifact
path: pkg-*
release:
name: On Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build-artifact
# - run: ls -R
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
pkg-linux-amd64
pkg-linux-arm64
pkg-darwin-amd64
pkg-darwin-arm64
pkg-windows-amd64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}