-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (86 loc) · 2.86 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build and Deploy
on:
release:
types: [ published ]
env:
build-output: sakura-publish
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
with:
environment: production
ignore_missing: true
ignore_empty: true
version: ${{ github.event.release.tag_name }}
docker-linux:
runs-on: ubuntu-latest
environment:
name: production
url: https://dragonfruit.network/
needs:
- sentry-release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_REGISTRY }}
username: ${{ secrets.OCI_USERNAME }}
password: ${{ secrets.OCI_PASSWORD }}
- name: Install wasm-tools
run: sudo dotnet workload install wasm-tools
- name: Build
run: dotnet publish -c Release -p:UseAppHost=false -p:Version=${{ github.event.release.tag_name }} -o ${{ env.build-output }} DragonFruit.Sakura.Host/DragonFruit.Sakura.Host.csproj
- id: meta
name: Create metadata
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKER_IMAGE }}
tags: |
type=raw,value=latest
type=ref,event=tag
- name: Image Build and Push
uses: docker/build-push-action@v6
with:
context: ${{ env.build-output }}
tags: ${{ vars.DOCKER_IMAGE }}
platforms: linux/arm64,linux/amd64
file: DragonFruit.Sakura.Host/Dockerfile
push: true
windows-iis:
runs-on: windows-latest
permissions:
contents: write
needs:
- sentry-release
environment:
name: production
url: https://dragonfruit.network/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build Program
run: dotnet publish -c Release -p:Version=${{ github.event.release.tag_name }} -p:PublishProfile=Web.pubxml DragonFruit.Sakura.Host
- name: Archive Output
run: Compress-Archive -Path .\DragonFruit.Sakura.Host\bin\publish\* -DestinationPath Sakura-${{ github.event.release.tag_name }}.zip
- name: Upload Deploy Package
uses: softprops/action-gh-release@v1
with:
files: Sakura-${{ github.event.release.tag_name }}.zip