cl-cli/.gitea/workflows/release/build-and-release.yaml
Julien Fastré 6569144381
Some checks failed
Release binary for cl-cli / build-and-release (push) Failing after 1m21s
create release
2024-01-08 22:12:53 +01:00

35 lines
1.3 KiB
YAML

name: Release binary for cl-cli
on:
push
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
id: read_release
shell: bash
run: |
r=$(cat .changes/v0.1.0.md) # <--- Read release.md (Provide correct path as per your repo)
r="${r//'%'/'%25'}" # Multiline escape sequences for %
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT # <--- Set environment variable
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
title: test
files: |-
target/release/cl-cli
api_key: '${{secrets.RELEASE_TOKEN}}'
body: |
${{ steps.read_release.outputs.RELEASE_BODY }}