CI: Change name to Build & Release #15
Workflow file for this run
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 workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
name: Build & Release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
permissions: | ||
contents: read | ||
contents: write | ||
jobs: | ||
linux-appimage: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7 | ||
with: | ||
compiler: ldc-latest | ||
- name: "Prepare for AppImage packing" | ||
run: | | ||
sudo apt update | ||
sudo apt install -y python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse | ||
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool.AppImage | ||
sudo chmod +x /usr/local/bin/appimagetool.AppImage | ||
- name: "Get build dependencies" | ||
run: | | ||
sudo apt install libsdl2-dev libfreetype6-dev | ||
- name: "Clone dependencies & set versions" | ||
run: | | ||
git clone https://github.com/Inochi2D/bindbc-imgui.git --recurse-submodules | ||
git clone https://github.com/Inochi2D/inochi2d.git | ||
git clone https://github.com/Inochi2D/facetrack-d.git | ||
git clone https://github.com/KitsunebiGames/i18n.git | ||
dub add-local bindbc-imgui/ "0.7.0" | ||
dub add-local inochi2d/ "0.7.2" | ||
dub add-local facetrack-d/ "0.6.2" | ||
dub add-local i18n/ "1.0.1" | ||
- name: 'Build AppImage' | ||
run: | | ||
# Build the project, with its main file included, without unittests | ||
dub build --compiler=ldc2 --build=release --config=full | ||
# Build the AppImage | ||
sudo chmod +x BuildAppImage.sh | ||
./BuildAppImage.sh | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: build/inochi-creator-x86_64.AppImage |