-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (61 loc) · 2.15 KB
/
Copy pathrelease.yml
File metadata and controls
64 lines (61 loc) · 2.15 KB
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
name: Low Pressure Zone Release
on:
release:
types: [ published ]
jobs:
build-client:
name: Build Client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: corepack enable
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: 'yarn'
cache-dependency-path: src/client/yarn.lock
check-latest: true
- run: yarn
working-directory: src/client
- run: yarn lint
working-directory: src/client
- run: yarn stylelint
working-directory: src/client
- run: yarn build --mode production
working-directory: src/client
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: client-build
path: ./src/server/LowPressureZone.Api/wwwroot/
publish:
name: Publish App
runs-on: ubuntu-latest
if: github.event.release.draft == false && github.event.release.prerelease == false
needs: [ build-client ]
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Download Client Build Artifacts
uses: actions/download-artifact@v8
with:
name: client-build
path: ./src/server/LowPressureZone.Api/wwwroot
- name: Update launchSettings.json to production information
run: mv ./src/server/LowPressureZone.Api/Properties/launchSettings-production.json ./src/server/LowPressureZone.Api/Properties/launchSettings.json
- name: Publish to Folder
run: dotnet publish ./src/server/LowPressureZone.Api/LowPressureZone.Api.csproj -c Release -o ./publish
- name: Zip Publish Output
run: zip -r low-pressure-zone-${{ github.event.release.tag_name }}.zip ./publish/* ./deploy.sh
- name: Upload zip to release
uses: softprops/action-gh-release@v3
with:
files: low-pressure-zone-${{ github.event.release.tag_name }}.zip
token: '${{ secrets.RELEASE_ASSET_TOKEN }}'