Skip to content

Commit

Permalink
Add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Feb 13, 2024
1 parent 7b78f13 commit 1534ece
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- "assets/**"
- "locale/**"
- ".github/workflows/build.yml"

pull_request:
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- "assets/**"
- "locale/**"
- ".github/workflows/build.yml"

env:
CARGO_TERM_COLOR: always
VERSION: 0.0.1

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- uses: Swatinem/rust-cache@v2

- name: Build
shell: bash
run: cargo build --release

- name: Upload artifact (windows)
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
with:
name: artifact-windows
path: ./target/release/dfint-installer.exe

- name: Upload artifact (linux)
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'ubuntu')
with:
name: artifact-linux
path: ./target/release/dfint-installer
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
shell: bash
run: cargo build --release

- name: Upload artifact (win)
- name: Upload artifact (windows)
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
with:
Expand Down

0 comments on commit 1534ece

Please sign in to comment.