name: Release Build
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-release:
name: Build Release Binary
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Build Release
run: cargo build --release
- name: Rename Output
run: mv target/release/s8n s8n-linux-amd64
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: s8n-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}