Luca D'Amico bf8224eeb0
Add autorelease (via GitHub Actions) (#8)
* Add autorelease action
2021-02-25 19:12:30 +01:00

89 lines
2.1 KiB
YAML

name: NDSFactory-Builds
on: [push]
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get install -y build-essential qt5-default cmake
mkdir build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
make -j4
- name: Archive Artifact
working-directory: ${{github.workspace}}/build
shell: bash
run: |
tar -czvf NDSFactory_`date +%Y%m%d`__Linux_x86_64.tar.gz NDSFactory ../README.md ../LICENSE
- name: Release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/NDSFactory_*__Linux_x86_64.tar.gz"
allowUpdates: true
tag: "autobuild"
token: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Qt
uses: jurplel/install-qt-action@v2
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Create Build Environment
run: |
mkdir build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
make -j4
macdeployqt NDSFactory.app
- name: Archive Artifact
working-directory: ${{github.workspace}}/build
shell: bash
run: |
zip -r NDSFactory_`date +%Y%m%d`__macOS_x86_64.zip NDSFactory.app ../README.md ../LICENSE
- name: Release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/NDSFactory_*__macOS_x86_64.zip"
allowUpdates: true
tag: "autobuild"
token: ${{ secrets.GITHUB_TOKEN }}