style: Format code according to style guide #369
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: CI-Build | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- LICENSE | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- LICENSE | |
workflow_dispatch: | |
jobs: | |
windows: | |
strategy: | |
matrix: | |
os-version: ['x64', 'arm64'] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Download Final2x-core and unzip | |
run: | | |
cd .\resources | |
Invoke-WebRequest -Uri https://github.com/Tohrusky/Final2x-core/releases/download/2023-07-12/Final2x-core-windows-latest.zip -OutFile Final2x-core.zip | |
7z x Final2x-core.zip -oFinal2x-core | |
del .\Final2x-core.zip | |
- name: build | |
run: | | |
pnpm install | |
pnpm run build:win-${{ matrix.os-version }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: zip-unpacked-x64 | |
if: matrix.os-version == 'x64' | |
run: | | |
cd .\dist\win-unpacked | |
7z a -r Final2x-windows-${{ matrix.os-version }}-unpacked.zip * | |
- name: zip-unpacked-arm64 | |
if: matrix.os-version == 'arm64' | |
run: | | |
cd .\dist\win-arm64-unpacked | |
7z a -r Final2x-windows-${{ matrix.os-version }}-unpacked.zip * | |
- name: upload-setup | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-windows-${{ matrix.os-version }}-setup | |
path: dist/*.exe | |
- name: upload-unpacked-x64 | |
if: matrix.os-version == 'x64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-windows-${{ matrix.os-version }}-unpacked | |
path: dist/win-unpacked/Final2x-windows-${{ matrix.os-version }}-unpacked.zip | |
- name: upload-unpacked-arm64 | |
if: matrix.os-version == 'arm64' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-windows-${{ matrix.os-version }}-unpacked | |
path: dist/win-arm64-unpacked/Final2x-windows-${{ matrix.os-version }}-unpacked.zip | |
macos: | |
strategy: | |
matrix: | |
os-version: ['x64', 'arm64'] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Download Final2x-core x64 | |
if: matrix.os-version == 'x64' | |
run: | | |
cd ./resources | |
wget https://github.com/Tohrusky/Final2x-core/releases/download/2023-07-12/Final2x-core-macos-latest.zip -O Final2x-core.zip | |
- name: Download Final2x-core arm64 | |
if: matrix.os-version == 'arm64' | |
run: | | |
cd ./resources | |
wget https://github.com/Tohrusky/Final2x-core/releases/download/2023-07-12/Final2x-core-macos-arm64.zip -O Final2x-core.zip | |
- name: Unzip Final2x-core | |
run: | | |
cd ./resources | |
unzip -d ./Final2x-core Final2x-core.zip | |
rm Final2x-core.zip | |
- name: build | |
run: | | |
pnpm install | |
pnpm run build:mac-${{ matrix.os-version }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: upload-dmg | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-macos-${{ matrix.os-version }}-dmg | |
path: dist/*.dmg | |
- name: upload-unpacked | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-macos-${{ matrix.os-version }}-unpacked | |
path: dist/*.zip | |
ubuntu: | |
strategy: | |
matrix: | |
os-version: ['x64'] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Download Final2x-core and unzip | |
run: | | |
cd ./resources | |
wget https://github.com/Tohrusky/Final2x-core/releases/download/2023-07-12/Final2x-core-ubuntu-20.04.zip -O Final2x-core.zip | |
unzip -d ./Final2x-core Final2x-core.zip | |
rm Final2x-core.zip | |
- name: build | |
run: | | |
pnpm install | |
pnpm run build:linux-${{ matrix.os-version }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: zip-unpacked | |
run: | | |
cd ./dist/linux-unpacked | |
zip -9 -r Final2x-ubuntu-${{ matrix.os-version }}-unpacked.zip ./* | |
- name: upload-snap | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-ubuntu-${{ matrix.os-version }}-snap | |
path: dist/*.snap | |
- name: upload-AppImage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-ubuntu-${{ matrix.os-version }}-AppImage | |
path: dist/*.AppImage | |
- name: upload-deb | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-ubuntu-${{ matrix.os-version }}-deb | |
path: dist/*.deb | |
- name: upload-unpacked | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-ubuntu-${{ matrix.os-version }}-unpacked | |
path: dist/linux-unpacked/Final2x-ubuntu-${{ matrix.os-version }}-unpacked.zip | |
linux-pip: | |
strategy: | |
matrix: | |
os-version: ['x64'] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: build | |
run: | | |
pnpm install | |
pnpm run build:linux-${{ matrix.os-version }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: zip-unpacked | |
run: | | |
cd ./dist/linux-unpacked | |
zip -9 -r Final2x-linux-pip-${{ matrix.os-version }}-unpacked.zip ./* | |
- name: upload-snap | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-linux-pip-${{ matrix.os-version }}-snap | |
path: dist/*.snap | |
- name: upload-AppImage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-linux-pip-${{ matrix.os-version }}-AppImage | |
path: dist/*.AppImage | |
- name: upload-deb | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-linux-pip-${{ matrix.os-version }}-deb | |
path: dist/*.deb | |
- name: upload-unpacked | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final2x-linux-pip-${{ matrix.os-version }}-unpacked | |
path: dist/linux-unpacked/Final2x-linux-pip-${{ matrix.os-version }}-unpacked.zip |