Enable CI for releasing the tool
This commit is contained in:
35
.gitea/workflows/release/build-and-release.yaml
Normal file
35
.gitea/workflows/release/build-and-release.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Release binary for cl-cli
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v**
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
- name: Install rust toolchain
|
||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
- name: Build binaries
|
||||
run: cargo build --release
|
||||
- name: Read release content
|
||||
uses: https://github.com/jaywcjlove/github-action-read-file@main
|
||||
id: read_release
|
||||
with:
|
||||
path: .changes/${{ github.ref_name }}.md
|
||||
- name: Setup go for using go gitea actions
|
||||
uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
- name: Use Go Action to release
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
target/release/cl-cli
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||
body: |
|
||||
${{ steps.read_release.outputs.content }}
|
Reference in New Issue
Block a user