Nightly Release #1299
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 9 * * *" | |
name: Nightly Release | |
permissions: | |
id-token: "write" | |
contents: "write" | |
packages: "write" | |
pull-requests: "read" | |
jobs: | |
"Package_Source": | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naikari/naikari-release:latest" | |
steps: | |
- name: Checkout Naikari Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
path: source | |
submodules: true | |
- name: Package Dist | |
run: | | |
meson setup build source -Dnightly=true -Dexecutable=disabled -Ddocs_c=disabled -Ddocs_lua=disabled | |
meson dist -C build --no-tests --include-subprojects | |
- name: Collect Artifacts | |
run: | | |
mkdir -p build/dist | |
cp -r source/utils/ci/gh build/dist/ | |
mv build/meson-dist/naikari-*.tar.xz build/dist/source.tar.xz | |
cp source/dat/VERSION build/dist | |
- name: Upload Source Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-dist | |
path: ${{ github.workspace }}/build/dist/source.tar.xz | |
if-no-files-found: error | |
- name: Upload Version Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-version | |
path: ${{ github.workspace }}/build/dist/VERSION | |
if-no-files-found: error | |
- name: Upload GitHub Deployment Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-github-deployment | |
path: ${{ github.workspace }}/build/dist/gh/* | |
if-no-files-found: error | |
"Linux_Naikari_Release": | |
needs: "Package_Source" | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naikari/naikari-linux-lts:latest" | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naikari-dist | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf source.tar.xz -C source --strip 1 | |
- name: Compile AppImage | |
run: | | |
./source/utils/buildAppImage.sh -n -s "source" -b "build" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-linux-x86-64 | |
path: "${{ github.workspace }}/build/dist/*" | |
"Windows_Naikari_Release": | |
needs: "Package_Source" | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naikari/naikari-windows:latest" | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naikari-dist | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf source.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
run: | | |
meson setup build source \ | |
--prefix="$(pwd)"/source/extras/windows/installer \ | |
--bindir=bin \ | |
-Dndata_path=bin \ | |
--cross-file='source/utils/build/windows_cross_mingw.ini' \ | |
--buildtype=debug \ | |
--force-fallback-for=SuiteSparse \ | |
-Dnightly=true \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Meson Compile | |
run: | | |
meson compile -C build | |
- name: Meson Install | |
run: | | |
meson install -C build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-win64 | |
path: ${{ github.workspace }}/build/dist/* | |
if-no-files-found: error | |
"Darwin_Naikari_Release": | |
needs: "Package_Source" | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naikari/naikari-macos:latest" | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naikari-dist | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf source.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
run: | | |
meson setup build source \ | |
--prefix="$(pwd)"/build/dist/Naikari.app \ | |
--bindir=Contents/MacOS \ | |
-Dndata_path=Contents/Resources \ | |
--cross-file='source/utils/build/macos_cross_osxcross.ini' \ | |
--buildtype=debug \ | |
-Dnightly=true \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Meson Compile | |
run: | | |
meson compile -C build | |
- name: Meson Install | |
run: | | |
meson install -C build | |
cd build/dist | |
zip -r naikari-macos.zip Naikari.app/* | |
rm -rf Naikari.app | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naikari-macos | |
path: ${{ github.workspace }}/build/dist/* | |
if-no-files-found: error | |
"Upload_Naikari_Release": | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naikari/naikari-release:latest" | |
needs: | |
[ | |
Package_Source, | |
Linux_Naikari_Release, | |
Windows_Naikari_Release, | |
Darwin_Naikari_Release, | |
] | |
if: ${{ github.repository == 'naikari/naikari' }} | |
steps: | |
- name: Checkout Naikari Repository | |
uses: actions/checkout@v3 | |
- name: Create Release Staging and Output Areas | |
run: | | |
mkdir -p temp build/{staging,dist/{lin64,macos,win64}} | |
working-directory: ${{ github.workspace }} | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/build/staging | |
- name: Create Github Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: "nightly" | |
prerelease: true | |
title: "Nightly build" | |
- name: Build and Upload Github Release | |
run: | | |
chmod -R +x build/staging/naikari-github-deployment | |
cp -r build/staging/naikari-github-deployment/* "$(pwd)" | |
./GHDeploy.sh -n -t "$(pwd)/build/staging" -o "$(pwd)/build/dist" -r "nightly" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |