diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33335ed6..87ff0675 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,13 +20,13 @@ jobs: GITHUB_REPOSITORY: ${{ github.repository }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x @@ -42,6 +42,9 @@ jobs: - name: Dotnet Build (Fedora) run: dotnet publish -r linux-x64 --sc --configuration Release -p:DefineConstants=WINE_XIV_FEDORA_LINUX --no-restore -o ./dist/XIVLauncher.Core-fedora + - name: Dotnet Build (Flatpak) + run: dotnet publish -r linux-x64 --sc --configuration Release -p:DefineConstants=FLATPAk --no-restore -o ./dist/XIVLauncher.Core-flatpak + - name: Dotnet Build (Windows) run: dotnet publish -r win-x64 --sc --configuration Release -o ./dist/XIVLauncher.Core-win10x64 diff --git a/.github/workflows/generate_flatpak_nuget_deps.yml b/.github/workflows/generate_flatpak_nuget_deps.yml deleted file mode 100644 index a2547519..00000000 --- a/.github/workflows/generate_flatpak_nuget_deps.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Nuget Dependencies" - -on: - workflow_dispatch: - -jobs: - Generate: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - fetch-depth: 0 - - - name: Setup Python3 - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - name: Setup Flatpak - run: | - sudo apt update -y - sudo apt install flatpak -y - flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - flatpak install --user org.freedesktop.Sdk.Extension.dotnet8/x86_64/23.08 -y # Update this when needed. - flatpak install --user org.freedesktop.Sdk/x86_64/23.08 -y # As well as this, if dependency generation is failing. - - - name: Generate nuget-dependencies.json - working-directory: ./src/XIVLauncher.Core/ - run: | - curl -LO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/dotnet/flatpak-dotnet-generator.py - python3 flatpak-dotnet-generator.py --dotnet 8 --freedesktop 23.08 nuget-dependencies.json XIVLauncher.Core.csproj - - - name: Upload nuget-dependencies.json - uses: actions/upload-artifact@v3 - with: - name: nuget-dependencies - path: | - ./src/XIVLauncher.Core/nuget-dependencies.json diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 67103650..d3c22de1 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -16,7 +16,7 @@ jobs: GITHUB_REPOSITORY: ${{ github.repository }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 @@ -26,14 +26,6 @@ jobs: with: python-version: 3.x - - name: Setup Flatpak - run: | - sudo apt update -y - sudo apt install flatpak -y - flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - flatpak install --user org.freedesktop.Sdk.Extension.dotnet8/x86_64/23.08 -y - flatpak install --user org.freedesktop.Sdk/x86_64/23.08 -y - - name: Setup .NET uses: actions/setup-dotnet@v3 with: @@ -51,6 +43,10 @@ jobs: working-directory: ./src/XIVLauncher.Core/ run: dotnet publish -r linux-x64 --sc --configuration Release -p:DefineConstants=WINE_XIV_ARCH_LINUX --no-restore -o ./dist/XIVLauncher.Core-arch + - name: Dotnet Build (Flatpak) + working-directory: ./src/XIVLauncher.Core/ + run: dotnet publish -r linux-x64 --sc --configuration Release -p:DefineConstants=FLATPAK --no-restore -o ./dist/XIVLauncher.Core-flatpak + - name: Dotnet Build (Fedora) working-directory: ./src/XIVLauncher.Core/ run: dotnet publish -r linux-x64 --sc --configuration Release -p:DefineConstants=WINE_XIV_FEDORA_LINUX --no-restore -o ./dist/XIVLauncher.Core-fedora @@ -59,19 +55,6 @@ jobs: working-directory: ./src/XIVLauncher.Core/ run: dotnet publish -r win-x64 --sc --configuration Release -o ./dist/XIVLauncher.Core-win10x64 - - name: Generate nuget-dependencies.json - working-directory: ./src/XIVLauncher.Core/ - run: | - curl -LO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/dotnet/flatpak-dotnet-generator.py - python3 flatpak-dotnet-generator.py --dotnet 8 --freedesktop 23.08 nuget-dependencies.json XIVLauncher.Core.csproj - - - name: Upload nuget-dependencies.json - uses: actions/upload-artifact@v3 - with: - name: nuget-dependencies - path: | - ./src/XIVLauncher.Core/nuget-dependencies.json - - name: Compress release files run: | sudo apt install zip -y @@ -79,6 +62,7 @@ jobs: # remove leading directories tar -czf ./dist/XIVLauncher.Core.tar.gz -C ./src/XIVLauncher.Core/dist/XIVLauncher.Core . tar -czf ./dist/XIVLauncher.Core-arch.tar.gz -C ./src/XIVLauncher.Core/dist/XIVLauncher.Core-arch . + tar -czf ./dist/XIVLauncher.Core-flatpak.tar.gz -C ./src/XIVLauncher.Core/dist/XIVLauncher.Core-flatpak . tar -czf ./dist/XIVLauncher.Core-fedora.tar.gz -C ./src/XIVLauncher.Core/dist/XIVLauncher.Core-fedora . zip -r ./dist/XIVLauncher.Core-win10x64.zip ./src/XIVLauncher.Core/dist/XIVLauncher.Core-win10x64 @@ -91,5 +75,6 @@ jobs: files: | ./dist/XIVLauncher.Core.tar.gz ./dist/XIVLauncher.Core-arch.tar.gz + ./dist/XIVLauncher.Core-flatpak.tar.gz ./dist/XIVLauncher.Core-fedora.tar.gz ./dist/XIVLauncher.Core-win10x64.zip