From 80ecbb1212a1dabffb9d6b722dc6835fa34e9f9c Mon Sep 17 00:00:00 2001 From: rjindael Date: Fri, 28 Jul 2023 06:05:41 -0700 Subject: [PATCH] chore(ci): split ci/build Windows builds need to run on Windows runners, so if we can't matrix-ify build then this is more organized anyway. --- .github/workflows/build.yml | 25 ++++++++++++++++++ .github/workflows/ci.yml | 51 ++++++++++--------------------------- 2 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e96dea7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build +on: [push, pull_request] + +jobs: + windows: + name: Windows + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0 + + - name: Build + run: | + dotnet publish -r win-x64 -c Release --no-self-contained -p:PublishDir=../publish/win-x64 + mv publish/win-x64/Kiseki.Launcher.Windows.exe publish/win-x64/Kiseki.Launcher.exe + mv publish/win-x64/Kiseki.Launcher.Windows.pdb publish/win-x64/Kiseki.Launcher.pdb + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: win-x64 + path: publish/win-x64/* \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af9c012..c0c68fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,46 +2,23 @@ name: CI on: [push] jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 7.0 - - - name: Build - run: | - dotnet publish -r win-x64 -c Release --no-self-contained -p:PublishDir=../publish/win-x64 - mv publish/win-x64/Kiseki.Launcher.Windows.exe publish/win-x64/Kiseki.Launcher.exe - mv publish/win-x64/Kiseki.Launcher.Windows.pdb publish/win-x64/Kiseki.Launcher.pdb - - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: win-x64 - path: publish/win-x64/* - release: name: Release - needs: build runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tag/v') steps: - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - path: x64 - - - name: Rename artifacts - run: mv x64/win-x64.zip Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip - - - name: Create release draft - uses: softprops/action-gh-release@v1 - with: - name: ${{ github.ref_name }} - files: Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip - draft: true \ No newline at end of file + - name: Download release artifacts + uses: actions/download-artifact@v3 + with: + path: x64 + + - name: Rename artifacts + run: mv x64/win-x64.zip Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip + + - name: Create release draft + uses: softprops/action-gh-release@v1 + with: + name: ${{ github.ref_name }} + files: Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip + draft: true \ No newline at end of file