fix(ci,deps): migrate to .gitea/workflows, update domain to forgejo.riotpiao.com/rock, remove agent/ local artifact
ci / test (push) Canceled after 0s
ci / test (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: golang:1.25
|
||||
env:
|
||||
GOPRIVATE: forgejo.riotpiao.com
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: install node + git (required by JS-based actions)
|
||||
run: apt-get update && apt-get install -y --no-install-recommends nodejs ca-certificates git
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: configure git auth for private module fetch
|
||||
run: |
|
||||
git config --global url."https://oauth2:${GITHUB_TOKEN}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
|
||||
|
||||
- name: build cross-platform binaries
|
||||
run: |
|
||||
mkdir -p dist
|
||||
VERSION="${GITHUB_REF_NAME}"
|
||||
for os in linux darwin; do
|
||||
for arch in amd64 arm64; do
|
||||
out="dist/kmsvc-${os}-${arch}"
|
||||
GOOS=$os GOARCH=$arch go build \
|
||||
-ldflags "-X forgejo.riotpiao.com/rock/kmsvc-cli/internal/cli.version=${VERSION}" \
|
||||
-o "${out}" ./cmd/kmsvc
|
||||
done
|
||||
done
|
||||
|
||||
- name: release
|
||||
uses: actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: ${{ env.GITHUB_SERVER_URL }}
|
||||
repo: ${{ env.GITHUB_REPOSITORY }}
|
||||
release-dir: dist
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user