Skip to content

Update base_request.go to omit empty fields (#1) #2

Update base_request.go to omit empty fields (#1)

Update base_request.go to omit empty fields (#1) #2

name: Build and update release assets
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
version:
required: true
description: 'version to update release assets'
default: 'v'
jobs:
assets:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.17
id: go
- name: Check out code
uses: actions/checkout@v1
- name: Get tag version
id: tag
run: |
TAG=${{ github.event.inputs.command }}
test -z "$TAG" && TAG=$(git tag --sort=-v:refname --points-at HEAD | head -n 1)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Cross compile
run: make build-all
- name: Upload assets to the release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export GOPATH=$(go env GOPATH)
go get -u github.com/tcnksm/ghr
echo "Upload version [${{ env.TAG }}]"
${GOPATH}/bin/ghr -replace ${{ env.TAG }} bin/release