qinglong-go/.gitea/workflows/ci.yml

48 lines
1.2 KiB
YAML

name: CI
on: [push, pull_request]
env:
BINARY_PREFIX: "qinglong-go_"
BINARY_SUFFIX: ""
COMMIT_ID: "${{ github.sha }}"
PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request."
LD_FLAGS: "-w -s"
HTTP_PROXY: "http://172.17.0.1:7890"
HTTPS_PROXY: "http://172.17.0.1:7890"
GOPROXY: "https://goproxy.cn,direct"
jobs:
build:
name: Build binary CI
runs-on: ubuntu-latest
container:
image: node:16-bullseye
# 持久化工具目录
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '1.20'
- name: Fetch all tags
run: git fetch --force --tags
- name: Run GoReleaser
uses: https://huoxue.link:12300/huoxue1/goreleaser-action@master
with:
version: latest
args: build --snapshot
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
# - name: upload-artifact
# uses: actions/upload-artifact@v3
# with:
# name: my-artifact
# path: dist/*/*