Linux github action

This commit is contained in:
Natsumi
2024-01-02 16:04:53 +13:00
parent e27a470dda
commit 108239c1da
+29 -45
View File
@@ -1,61 +1,45 @@
name: VRCX name: VRCX
on: on:
- push - workflow_dispatch
- pull_request
jobs: jobs:
build_vrcx_win: build_dotnet:
runs-on: ubuntu-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup .NET 8 - name: Setup .NET 8
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: '8.0.x' dotnet-version: "8.0.x"
- uses: actions/upload-artifact@v3
- name: Setup NodeJS 18
uses: actions/setup-node@v4
with: with:
node-version: 18 name: vrcx
path: bin/x64/Release
- name: Setup NSIS build_node:
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi runs-on: ubuntu-latest
defaults:
run:
working-directory: html
- name: Restore Node Dependencies steps:
run: cd ${{ github.workspace }}/html && npm ci && cd ${{ github.workspace }} - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
#- name: JS Lint uses: actions/setup-node@v3
# run: cd html && npm run lint && cd ..
- name: Build Web UI
run: cd ${{ github.workspace }}/html && npm run production && cd ${{ github.workspace }}
- name: Build .NET Application
run: dotnet build -p:Configuration=Release -p:Platform=x64 -p:EnableWindowsTargeting=true --self-contained
- name: Copy Web UI
run: cp -r ${{ github.workspace }}/html/dist ${{ github.workspace }}/bin/x64/Release/html
- name: Fix NSIS Permissions
run: sudo chown -R $(whoami) /usr/share/nsis/Plugins/
- name: Build Installer
uses: joncloud/makensis-action@v4
with: with:
script-file: ${{ github.workspace }}/Installer/installer.nsi node-version: ${{ matrix.node-version }}
additional-plugin-paths: ${{ github.workspace }}/Installer/Plugins - name: Restore dependencies
run: npm ci
- name: Upload Zip - name: Build
uses: actions/upload-artifact@v3 run: npm run production
- name: Fix folder structure
id: fix-folders
run: |
mkdir upload
mv dist upload/html
- uses: actions/upload-artifact@v3
with: with:
name: "VRCX" name: vrcx
path: ${{ github.workspace }}/bin/x64/Release/* path: html/upload
- name: Upload Installer
uses: actions/upload-artifact@v3
with:
name: "VRCX_Setup"
path: ${{ github.workspace }}/Installer/VRCX_Setup.exe