diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..473883f --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -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"