Add Release Action for Codeberg
This commit is contained in:
parent
66d90100df
commit
bf2b20b19e
35
.forgejo/workflows/release.yml
Normal file
35
.forgejo/workflows/release.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Build and Release Rust Binary
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Triggers the workflow only when you push a version tag like v1.0.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-release:
|
||||||
|
runs-on: codeberg-small
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
# - name: Install Rust Toolchain
|
||||||
|
# uses: https://github.com/actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
# with:
|
||||||
|
# toolchain: stable
|
||||||
|
# target: x86_64-unknown-linux-gnu
|
||||||
|
- name: Build release binary
|
||||||
|
run: cargo build --release
|
||||||
|
- name: Prepare release asset
|
||||||
|
run: |
|
||||||
|
mkdir dist
|
||||||
|
cp -R examples dist/examples
|
||||||
|
cp target/release/ckgreeter dist/ckgreeter
|
||||||
|
- name: Publish Forgejo Release
|
||||||
|
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
url: https://codeberg.org/
|
||||||
|
repo: CanadianBaconBoi/CKGreeter
|
||||||
|
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
|
tag: ${{ forgejo.ref_name }}
|
||||||
|
release-dir: dist
|
||||||
|
release-notes: "Automated Release with Actions"
|
||||||
Loading…
Reference in New Issue
Block a user