-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (48 loc) · 1.38 KB
/
cicd.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
name: CICD
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'alpha'
- 'beta'
- 'dev'
pull_request:
types: [opened, reopened, synchronize]
merge_group:
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
env:
DOTNET_INSTALL_DIR: "./.dotnet"
with:
global-json-file: global.json
- name: Dotnet Restore Workloads
run: dotnet workload restore
- name: Dotnet Build
run: dotnet build -c Release
- name: Dotnet Publish Browser
working-directory: src/AvaloniaTetris.Browser
run: dotnet publish -c Release
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install Netlify CLI
run: npm install netlify-cli -g
- name: Deploy
run: netlify deploy ${{ (github.ref == 'refs/heads/main' && '--prod') || '' }} --json -d src/AvaloniaTetris.Browser/bin/Release/net8.0/browser-wasm/AppBundle/
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}