67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
name: Build App
|
|
run-name: ${{ gitea.actor }} is building
|
|
on: [push]
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest-real
|
|
steps:
|
|
- name: Update
|
|
run: |
|
|
sudo apt-get update -y -qq
|
|
sudo apt-get install zip
|
|
sudo sh -c "echo '192.168.1.253 descartes.local' >> /etc/hosts"
|
|
sudo sh -c "echo '192.168.1.253 build.ladose.net' >> /etc/hosts"
|
|
- name: GetDNS
|
|
run: |
|
|
cat /etc/resolv.conf
|
|
- name: Setup .NET 6.x
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
# Semantic version range syntax or exact version of a dotnet version
|
|
dotnet-version: '8.x'
|
|
|
|
- run: echo "Build."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Restore Deps
|
|
run : |
|
|
cd LaDOSE.Src/
|
|
dotnet restore LaDOSE.linux.sln
|
|
- name: Build
|
|
run: |
|
|
cd LaDOSE.Src/
|
|
dotnet build --configuration Release --os linux LaDOSE.DesktopApp.Avalonia
|
|
dotnet build --configuration Release --os win LaDOSE.DesktopApp.Avalonia
|
|
- name: Zip file
|
|
run: |
|
|
zip -rj build-winx64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net8.0/win-x64/
|
|
zip -rj build-linux64.zip ./LaDOSE.Src/LaDOSE.DesktopApp.Avalonia/bin/Release/net8.0/linux-x64/
|
|
- name: Upload Artifact Windows
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build-linux64.zip
|
|
name: build-linux64.zip
|
|
retention-days: 30
|
|
overwrite: true
|
|
|
|
- name: Upload Artifact Linux
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: build-winx64.zip
|
|
name: build-winx64.zip
|
|
retention-days: 30
|
|
overwrite: true
|
|
|
|
- name: Release
|
|
if: github.ref_name == 'master'
|
|
uses: akkuman/gitea-release-action@v1
|
|
tag_name: release-${{ steps.date.outputs.date }}
|
|
env:
|
|
with:
|
|
files: |-
|
|
build-winx64.zip
|
|
build-linux64.zip
|
|
|