nip/.gitea/workflows/release.yml

33 lines
1.0 KiB
YAML
Raw Normal View History

2024-08-25 23:07:53 +08:00
on:
push:
tags:
- v*
jobs:
release:
runs-on: lego
steps:
- name: 检出代码
uses: http://${{secrets.ACTION_ACCESS_GIT}}@git.lovezsh.com/actions/checkout@v4
- name: 设置go环境
uses: https://github.com/actions/setup-go@v5
with:
go-version: "1.22.4"
- name: 编译
run: |
GOOS=linux GOARCH=amd64 go build -o nip cmd/main.go
2024-08-25 23:11:39 +08:00
GOOS=windows GOARCH=amd64 go build -o nip.exe cmd/main.go
2024-08-25 23:16:26 +08:00
- name: 上传linux编译文件
2024-08-25 23:11:39 +08:00
run: |
2024-08-25 23:16:26 +08:00
curl --user lovezsh:${{secrets.ACTION_ACCESS_GIT}} \
--upload-file ./nip \
https://git.lovezsh.com/api/packages/lovezsh/generic/nip/1.0.0/nip_linux_amd64
- name: 上传lwindows编译文件
run: |
curl --user lovezsh:${{secrets.ACTION_ACCESS_GIT}} \
--upload-file ./nip.exe \
https://git.lovezsh.com/api/packages/lovezsh/generic/nip/1.0.0/nip_windows_amd64.exe