add discord links to readme #255
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
name: build brickrail | |
on: [push] | |
env: | |
GODOT_VERSION: 3.5 | |
EXPORT_NAME: Brickrail | |
PROJECT_PATH: brickrail-gui | |
jobs: | |
ble-server-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: run pyinstaller | |
run: | | |
pyinstaller ble_server-linux.spec | |
- name: upload dist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ble-server-linux | |
path: dist/ble-server-linux | |
retention-days: 1 | |
ble-server-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: run pyinstaller | |
run: | | |
pyinstaller ble_server-windows.spec | |
- name: upload dist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ble-server-windows | |
path: dist/ble-server-windows | |
retention-days: 1 | |
build-app: | |
name: Build godot app and package with ble server | |
needs: [ble-server-windows, ble-server-linux] | |
runs-on: ubuntu-latest | |
container: | |
image: barichello/godot-ci:3.5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.local/share/godot/templates | |
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable | |
- name: Windows Build | |
run: | | |
mkdir -v -p build/windows | |
cd $PROJECT_PATH | |
godot -v --export-debug "Windows Desktop" ../build/windows/$EXPORT_NAME.exe | |
- name: Linux Build | |
run: | | |
mkdir -v -p build/linux | |
cd $PROJECT_PATH | |
godot -v --export-debug "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64 | |
- name: Download windows ble-server artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ble-server-windows | |
path: build/windows/ble-server-windows | |
- name: Download linux ble-server artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ble-server-linux | |
path: build/linux/ble-server-linux | |
- name: Copy firmware and LICENSE into build folders | |
run: | | |
mkdir -v -p build/windows/firmware | |
cp firmware/* build/windows/firmware | |
cp LICENSE build/windows/LICENSE | |
mkdir -v -p build/linux/firmware | |
cp firmware/* build/linux/firmware | |
cp LICENSE build/linux/LICENSE | |
- name: Append commit sha to version file | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: echo -$(echo ${{ github.sha }} | cut -c1-8) >> version.txt | |
- name: Add version file | |
run: | | |
cp version.txt build/linux/ | |
cp version.txt build/windows/ | |
- name: Upload windows Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: brickrail-windows | |
path: build/windows | |
- name: Upload linux Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: brickrail-linux | |
path: build/linux | |
release: | |
name: Upload release | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: [build-app] | |
steps: | |
- name: Download windows build | |
uses: actions/download-artifact@v3 | |
with: | |
name: brickrail-windows | |
path: brickrail-windows | |
- name: Download linux build | |
uses: actions/download-artifact@v3 | |
with: | |
name: brickrail-linux | |
path: brickrail-linux | |
- name: Get tag | |
run: echo "GITHUB_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV | |
- name: add linux executable permission | |
run: chmod +x brickrail-linux/Brickrail.x86_64 | |
- name: zip builds | |
run: | | |
zip -r brickrail-windows-${{ env.GITHUB_TAG }}.zip brickrail-windows | |
zip -r brickrail-linux-${{ env.GITHUB_TAG }}.zip brickrail-linux | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
brickrail-windows-${{ env.GITHUB_TAG }}.zip | |
brickrail-linux-${{ env.GITHUB_TAG }}.zip |