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

44 lines
1.1 KiB
YAML
Raw Normal View History

2023-09-05 11:35:54 +00:00
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"
VERSION: "action"
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: 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
2023-09-08 05:49:06 +00:00
uses: https://huoxue.link:12300/huoxue1/goreleaser-action@master
2023-09-05 11:35:54 +00:00
with:
version: latest
2023-09-08 05:49:06 +00:00
args: build --snapshot
2023-09-05 11:35:54 +00:00
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
2023-09-08 05:49:06 +00:00
# - name: upload-artifact
# uses: actions/upload-artifact@v3
# with:
# name: my-artifact
# path: dist/*/*
2023-09-05 11:35:54 +00:00