mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add build release workflow
This commit is contained in:
parent
1e32cb8688
commit
de31838195
1 changed files with 56 additions and 0 deletions
56
.forgejo/workflows/release.yml
Normal file
56
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
name: Build release binaries
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checking out branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
shell: bash
|
||||||
|
run: curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile minimal
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
|
||||||
|
- name: Create out directory
|
||||||
|
run: |
|
||||||
|
mkdir out
|
||||||
|
|
||||||
|
- name: Build webui
|
||||||
|
run: |
|
||||||
|
cd webui
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Build x86_64-unknown-linux-gnu
|
||||||
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
cargo build --target x86_64-unknown-linux-gnu --release || echo "Failed to build"
|
||||||
|
mv target/x86_64-unknown-linux-gnu/release/ew out/ew-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- name: Build x86_64-pc-windows-gnu
|
||||||
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
sudo apt update && sudo apt install gcc-mingw-w64 -y
|
||||||
|
rustup target add x86_64-pc-windows-gnu
|
||||||
|
cargo build --target x86_64-pc-windows-gnu --release || echo "Failed to build"
|
||||||
|
mv target/x86_64-pc-windows-gnu/release/ew.exe out/ew-x86_64-pc-windows-gnu.exe
|
||||||
|
|
||||||
|
- name: Publish release
|
||||||
|
uses: actions/forgejo-release@v2
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
release-dir: ./out/
|
||||||
|
release-notes-assistant: true
|
||||||
|
tag: "${{ github.ref_name }}"
|
||||||
|
sha: "${{ github.sha }}"
|
||||||
|
title: "Release ${{ github.ref_name }}"
|
||||||
|
token: ${{ github.token }}
|
Loading…
Add table
Reference in a new issue