From 0b1e1eb3abf73c4d6773ba7051c555fd0b73e2e0 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Mon, 6 May 2024 18:26:02 +0200 Subject: [PATCH] Add release workflow --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..c5f3d9db --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Create release + +on: + push: + branches: main + tags: v*.* + +env: + RELEASE_NAME: PCK-Studio + +jobs: + CreateRelease: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Get NuGet Packages + run: nuget restore PCK_Studio.sln + + - name: Build solution + run: "msbuild PCK_Studio.sln -p:Configuration=Release" + + - name: Package binary + run: Compress-Archive -Path ${{ github.workspace }}\PCK-Studio\bin\Release\ -Destination ${{ env.RELEASE_NAME }}.zip + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ env.RELEASE_NAME }}.zip + \ No newline at end of file