Skip to content

Commit

Permalink
updated individual workflows for build / release
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Mar 26, 2024
1 parent 167e4de commit a4a7fc9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 31 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,18 @@
name: Release
name: Test Builds

on:
workflow_dispatch:
release:
types: [published]
push:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
build-win:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: cargo build --release --verbose

- name: Run tests
run: cargo test --release --verbose

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: resfetch-win
path: target/release/deps/resfetch.exe

build-unix:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

Expand All @@ -40,13 +21,11 @@ jobs:
uses: actions/checkout@v4

- name: Build
run: cargo build --release --verbose

- name: Run tests
run: cargo test --release --verbose
run: cargo build --verbose

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: resfetch-${{ matrix.os }}
path: target/release/resfetch
name: ${{ runner.os }}-target
path: target/debug/*
retention-days: 1
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Builds

on:
workflow_dispatch:
release:
types: [published]

env:
CARGO_TERM_COLOR: always

jobs:
build-win:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: cargo build --release --verbose

- name: Run tests
run: cargo test --release --verbose

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: resfetch-win
path: target/release/deps/resfetch.exe
retention-days: 90

build-unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: cargo build --release --verbose

- name: Run tests
run: cargo test --release --verbose

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: resfetch-${{ matrix.os }}
path: target/release/resfetch
retention-days: 90

0 comments on commit a4a7fc9

Please sign in to comment.