mirror of
https://github.com/Luca1991/NDSFactory.git
synced 2026-02-04 05:36:15 +01:00
v1.1 (#16)
This commit is contained in:
84
.github/workflows/build.yml
vendored
84
.github/workflows/build.yml
vendored
@@ -1,40 +1,29 @@
|
||||
name: NDSFactory-Builds
|
||||
name: Build and Release on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
clean-old-autorelease:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: dev-drprasad/delete-tag-and-release@v0.1.3
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: autobuild
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Create Build Environment
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential qt5-default cmake
|
||||
sudo apt-get install -y build-essential libgl1-mesa-dev and libglvnd-dev cmake qt6-base-dev
|
||||
mkdir build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
@@ -42,28 +31,27 @@ jobs:
|
||||
make -j4
|
||||
|
||||
- name: Archive Artifact
|
||||
working-directory: ${{github.workspace}}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||
cd build
|
||||
tar -czvf NDSFactory_${git_hash}__Linux_x86_64.tar.gz NDSFactory ../README.md ../LICENSE
|
||||
tar -czvf NDSFactory-${{ github.ref_name }}-Linux-x64.tar.gz NDSFactory ../README.md ../LICENSE
|
||||
|
||||
- name: Release on GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
uses: softprops/action-gh-release@v2.0.8
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
artifacts: "build/NDSFactory_*__Linux_x86_64.tar.gz"
|
||||
allowUpdates: true
|
||||
tag: "autobuild"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "build/NDSFactory-${{ github.ref_name }}-Linux-x64.tar.gz"
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '6.5.2'
|
||||
|
||||
- name: Install CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
@@ -76,37 +64,37 @@ jobs:
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
make -j4
|
||||
macdeployqt NDSFactory.app
|
||||
|
||||
|
||||
- name: Archive Artifact
|
||||
working-directory: ${{github.workspace}}
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||
cd build
|
||||
zip -r NDSFactory_${git_hash}__macOS_x86_64.zip NDSFactory.app ../README.md ../LICENSE
|
||||
zip -r NDSFactory-${{ github.ref_name }}-macOS.zip NDSFactory.app ../README.md ../LICENSE
|
||||
|
||||
- name: Release on GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
uses: softprops/action-gh-release@v2.0.8
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
artifacts: "build/NDSFactory_*__macOS_x86_64.zip"
|
||||
allowUpdates: true
|
||||
tag: "autobuild"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "build/NDSFactory-${{ github.ref_name }}-macOS.zip"
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: '6.5.2'
|
||||
|
||||
- name: Install CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
@@ -133,12 +121,10 @@ jobs:
|
||||
run: |
|
||||
xcopy ..\..\README.md .\prod
|
||||
xcopy ..\..\LICENSE .\prod
|
||||
powershell "Compress-Archive -Path .\prod\* -DestinationPath .\NDSFactory_AUTOBUILD__Windows_x86_64.zip"
|
||||
powershell "Compress-Archive -Path .\prod\* -DestinationPath .\NDSFactory-${{ github.ref_name }}-Windows-x64.zip"
|
||||
|
||||
- name: Release on GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
uses: softprops/action-gh-release@v2.0.8
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
artifacts: "build/Release/NDSFactory_*__Windows_x86_64.zip"
|
||||
allowUpdates: true
|
||||
tag: "autobuild"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "build/Release/NDSFactory-${{ github.ref_name }}-Windows-x64.zip"
|
||||
Reference in New Issue
Block a user