forked from dotnet/apisof.net
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.13 KB
/
Copy pathdeploy-planner.yml
File metadata and controls
75 lines (63 loc) · 2.13 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
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy Planner
on:
push:
branches: [ main ]
paths:
- .github/workflows/deploy-planner.yml
- src/NetUpgradePlanner/**
- src/Terrajobst.ApiCatalog/**
- src/Terrajobst.NetUpgradePlanner/**
- src/Terrajobst.NetUpgradePlanner.Excel/**
- src/Terrajobst.UsageCrawling/**
env:
DOTNET_NOLOGO: true
jobs:
build:
runs-on: windows-latest
steps:
- name: Get code
uses: actions/checkout@v6
with:
fetch-depth: 0 # We need the full history in order to use Git versioning
- name: Get .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.*'
- name: Get GitVersion
uses: dotnet/nbgv@master
id: nbgv
with:
path: src/NetUpgradePlanner
- name: dotnet publish
run: |
cd src/NetUpgradePlanner
dotnet publish /p:SourceRevisionId=${{ github.sha }}
- name: squirrel pack
shell: pwsh
run: |
mkdir .artifacts/squirrel-release
cd .artifacts/publish/NetUpgradePlanner
Set-Alias Squirrel ($env:USERPROFILE + "\.nuget\packages\clowd.squirrel\2.11.1\tools\Squirrel.exe");
Squirrel http-down --url "https://apisofdotnet.blob.core.windows.net/squirrel/" -r "../../squirrel-release"
Squirrel pack --framework net6.0,vcredist143-x86 --packId "NetUpgradePlanner" --packTitle ".NET Upgrade Planner" --packVersion "${{ steps.nbgv.outputs.SemVer1 }}" --packAuthors "Immo Landwerth" --packDir "." -r "../../squirrel-release"
- name: Upload build
uses: actions/upload-artifact@v7
with:
name: squirrel-release
path: .artifacts/squirrel-release
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build
uses: actions/download-artifact@v8
with:
name: squirrel-release
path: .artifacts/squirrel-release
- name: Upload release
uses: azure/cli@v3
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
with:
inlineScript: |
az storage blob upload-batch -d squirrel -s .artifacts/squirrel-release --overwrite