Skip to content

Commit

Permalink
workflows: basic release build
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thompson committed Jan 7, 2024
1 parent 4488143 commit 982a71e
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
linux-build:
name: Linux release build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install distro packages
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libudev-dev
- uses: dtolnay/rust-toolchain@stable

- run: cargo build --release

- name: Run packaging steps
run: |
mkdir -p tdr2024-linux-amd64/bin
install -s target/release/tdr2024 tdr2024-linux-amd64/bin/tdr2024
install LICENSE.md bin/LICENSE.md
install README.md bin/LICENSE.md
tar cf - tdr2024-linux-amd64 | xz -T0 -c > tdr2024-linux-amd64.tar.xz
- uses: actions/upload-artifact@v3
with:
name: Linux release build
path: tdr2024-linux-amd64.tar.xz

windows-build:
name: Windows release build
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- run: cargo build --release

- uses: actions/upload-artifact@v3
with:
name: Windows release build
path: |
target/release/tdr2024.exe
INSTALL.md
README.md

0 comments on commit 982a71e

Please sign in to comment.