diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c5f6b92..0b14d92 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 -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/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/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 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..0162fa7 100644 --- a/DragonFruit.Sakura/DragonFruit.Sakura.csproj +++ b/DragonFruit.Sakura/DragonFruit.Sakura.csproj @@ -15,14 +15,14 @@ - - - - - + + + + + - - + +