From 23f865d289c64f54e95552a41e04e86e7af60fea Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Sun, 24 Sep 2023 16:36:39 +0100 Subject: [PATCH 1/4] add iis inprocess config and update deps --- .../DragonFruit.Sakura.Host.csproj | 9 +- DragonFruit.Sakura.Host/web.config | 108 ++++++++++++++++++ DragonFruit.Sakura/DragonFruit.Sakura.csproj | 16 +-- 3 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 DragonFruit.Sakura.Host/web.config diff --git a/DragonFruit.Sakura.Host/DragonFruit.Sakura.Host.csproj b/DragonFruit.Sakura.Host/DragonFruit.Sakura.Host.csproj index 9917248..705094f 100644 --- a/DragonFruit.Sakura.Host/DragonFruit.Sakura.Host.csproj +++ b/DragonFruit.Sakura.Host/DragonFruit.Sakura.Host.csproj @@ -3,6 +3,7 @@ net7.0 Linux + InProcess @@ -10,13 +11,9 @@ - - + + - - - - diff --git a/DragonFruit.Sakura.Host/web.config b/DragonFruit.Sakura.Host/web.config new file mode 100644 index 0000000..ed1e00c --- /dev/null +++ b/DragonFruit.Sakura.Host/web.config @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DragonFruit.Sakura/DragonFruit.Sakura.csproj b/DragonFruit.Sakura/DragonFruit.Sakura.csproj index 81e8309..f349c3b 100644 --- a/DragonFruit.Sakura/DragonFruit.Sakura.csproj +++ b/DragonFruit.Sakura/DragonFruit.Sakura.csproj @@ -15,14 +15,14 @@ - - - - - - - - + + + + + + + + From c601295e7862322874d457b65b30e2c6566958f2 Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Sun, 24 Sep 2023 16:43:41 +0100 Subject: [PATCH 2/4] add iis publish profile and update workflow --- .github/workflows/deploy.yml | 71 ++++++++++++++----- .gitignore | 4 +- .../Properties/PublishProfiles/Web.pubxml | 23 ++++++ 3 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 DragonFruit.Sakura.Host/Properties/PublishProfiles/Web.pubxml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c5f6b92..bbb23a7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,32 +4,58 @@ on: release: types: [ published ] +permissions: + contents: write + env: build-output: sakura-publish jobs: - deploy: + sentry-release: runs-on: ubuntu-latest + environment: name: production url: https://dragonfruit.network/ - + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-dotnet@v2 + - name: Create Sentry release + uses: getsentry/action-release@v1 + env: + SENTRY_ORG: dragonfruit + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + with: + projects: sakura + ignore_missing: true + version: ${{ github.ref_name }} + + linux-container: + runs-on: ubuntu-latest + + needs: + - sentry-release + + environment: + name: production + url: https://dragonfruit.network/ + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 with: dotnet-version: '7.0.x' - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Create build output folder run: mkdir ${{ env.build-output }} @@ -56,13 +82,26 @@ jobs: platforms: linux/arm64,linux/amd64 tags: ${{ steps.meta.outputs.tags }} file: DragonFruit.Sakura.Host/Dockerfile + + windows-iis: + runs-on: windows-latest + + needs: + - sentry-release - - name: Create Sentry release - uses: getsentry/action-release@v1 - env: - SENTRY_ORG: dragonfruit - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + environment: + name: production + url: https://dragonfruit.network/ + + steps: + - uses: actions/checkout@v3 + - name: Build Program + run: dotnet publish -c Release -r win-x64 -p:Version=${{ github.ref_name }} -p:PublishProfile=Web.pubxml DragonFruit.Sakura.Host + + - name: Archive Output + run: Compress-Archive -Path .\DragonFruit.Sakura.Host\bin\publish\* -DestinationPath Sakura-${{ github.ref_name }}.zip + + - name: Upload Deploy Package + uses: softprops/action-gh-release@v1 with: - projects: sakura - ignore_missing: true - version: ${{ github.ref_name }} + files: Sakura-${{ github.ref_name }}.zip \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8a30d25..2011b59 100644 --- a/.gitignore +++ b/.gitignore @@ -184,8 +184,8 @@ publish/ *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj +# *.pubxml +# *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained diff --git a/DragonFruit.Sakura.Host/Properties/PublishProfiles/Web.pubxml b/DragonFruit.Sakura.Host/Properties/PublishProfiles/Web.pubxml new file mode 100644 index 0000000..0a63525 --- /dev/null +++ b/DragonFruit.Sakura.Host/Properties/PublishProfiles/Web.pubxml @@ -0,0 +1,23 @@ + + + + + <_TargetId>IISWebDeployPackage + + Sakura + Package + Production + 99b15da3-9e63-4970-84b3-dff7948da6a5 + + Any CPU + Release + + False + net7.0 + true + bin\publish\Sakura.zip + + \ No newline at end of file From 362561725c64340c75ca8871410ff0bb29942a5e Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Sun, 24 Sep 2023 16:44:51 +0100 Subject: [PATCH 3/4] revert mudblazor version --- DragonFruit.Sakura/DragonFruit.Sakura.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DragonFruit.Sakura/DragonFruit.Sakura.csproj b/DragonFruit.Sakura/DragonFruit.Sakura.csproj index f349c3b..0162fa7 100644 --- a/DragonFruit.Sakura/DragonFruit.Sakura.csproj +++ b/DragonFruit.Sakura/DragonFruit.Sakura.csproj @@ -20,7 +20,7 @@ - + From 01ae502763ea631c360c9a7bfe2af1000fb55bd2 Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Sun, 24 Sep 2023 16:49:44 +0100 Subject: [PATCH 4/4] fix warning --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bbb23a7..0b14d92 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -96,7 +96,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build Program - run: dotnet publish -c Release -r win-x64 -p:Version=${{ github.ref_name }} -p:PublishProfile=Web.pubxml DragonFruit.Sakura.Host + run: dotnet publish -c Release -p:Version=${{ github.ref_name }} -p:PublishProfile=Web.pubxml DragonFruit.Sakura.Host - name: Archive Output run: Compress-Archive -Path .\DragonFruit.Sakura.Host\bin\publish\* -DestinationPath Sakura-${{ github.ref_name }}.zip