-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #21, Add a workflow to build and release binaries automatically
Additional changes: - Add no-gui build for linux - Change changelog format so that releases can automatically link to them using the tagname - Fix the directory for the integration tests on Windows
- Loading branch information
Showing
4 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Build and Release | ||
|
||
# Only run when a tag is pushed | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
env: | ||
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: extractions/setup-just@v1 | ||
|
||
- name: Install Rust for macOS | ||
if: matrix.os == 'macos-latest' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: aarch64-apple-darwin | ||
- name: Install Rust for Windows | ||
if: matrix.os == 'windows-latest' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install Rust for Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: x86_64-pc-windows-gnu | ||
|
||
- name: Install Linux dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt-get install librust-gdk-dev gcc-mingw-w64-x86-64 | ||
|
||
- name: Lint code | ||
run: just lint | ||
|
||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
- name: Build macOS | ||
if: matrix.os == 'macos-latest' | ||
run: just build-mac | ||
- name: Build Windows | ||
if: matrix.os == 'windows-latest' | ||
run: just build-win | ||
- name: Build Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: just build-linux | ||
- name: Build Linux NoGUI | ||
if: matrix.os == 'ubuntu-latest' | ||
run: just build-linux-nogui | ||
|
||
- name: Upload build artefacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: out/ferium*.zip | ||
if-no-files-found: error | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download artefacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: binaries | ||
path: ./out | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./out/* | ||
name: Ferium ${{ github.ref_name }} | ||
body: | | ||
Compiled binaries for Ferium version `${{ github.ref_name }}` ([changelog](https://github.com/theRookieCoder/ferium/blob/main/CHANGELOG.md#${{ github.ref_name }})) | ||
The provided binaries are for: | ||
- GNU Linux (x64 linux gnu) without a GUI file dialog and libraries | ||
- GNU Linux (x64 linux gnu) | ||
- macOS Apple Silicon (aarch64 darwin) | ||
- macOS Intel (x64 darwin) | ||
- GNU Windows, e.g. cygwin (x64 windows gnu) | ||
- MSVC Windows (x64 windows msvc) | ||
You can install these by downloading and unzipping the appropriate asset, and moving the executable to ~/bin or any other binary folder in your path. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters