File tree Expand file tree Collapse file tree 1 file changed +37
-3
lines changed Expand file tree Collapse file tree 1 file changed +37
-3
lines changed Original file line number Diff line number Diff line change 22 push :
33 tags :
44 - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5+ workflow_dispatch :
6+ inputs :
7+ version :
8+ description : Version
9+ required : true
10+ type : string
11+ deploy :
12+ description : Deploy
13+ required : true
14+ type : boolean
15+ default : false
516name : Create Release MAUI
617jobs :
18+ prepare :
19+ runs-on : ubuntu-latest
20+ outputs :
21+ Version : ${{ steps.set-values.outputs.Version }}
22+ Deploy : ${{ steps.set-values.outputs.Deploy }}
23+ defaults :
24+ run :
25+ shell : bash
26+ steps :
27+ - name : Update Environment Variables
28+ id : set-values
29+ run : |
30+ if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then
31+ echo "Version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
32+ echo "Deploy=${{ github.event.inputs.deploy }}" >> "$GITHUB_OUTPUT"
33+ else
34+ echo "Version=${GITHUB_REF##*/v}" >> "$GITHUB_OUTPUT"
35+ echo "Deploy=true" >> "$GITHUB_OUTPUT"
36+ fi
737 build :
38+ needs : [ prepare ]
839 name : Create Release
940 runs-on : windows-2022
10- timeout-minutes : 30
41+ timeout-minutes : 15
1142 steps :
1243 - name : Checkout code
1344 uses : actions/checkout@v2
1445
1546 - name : Setup .NET Core
1647 uses : actions/setup-dotnet@v3
1748 with :
18- dotnet-version : 9.0.x
49+ dotnet-version : |
50+ 8.0.x
51+ 9.0.x
1952
2053 - name : Install dependencies
2154 run : |
2457
2558 - name : Dotnet Pack
2659 working-directory : ./src/Blazor-ApexCharts-MAUI
27- run : dotnet pack -c Release -p:Version=${GITHUB_REF##*/v }
60+ run : dotnet pack -c Release -p:Version=${{ needs.prepare.outputs.Version }} -p:AssemblyVersion=${{ needs.prepare.outputs.Version } }
2861
2962 - name : Dotnet Nuget Push
63+ if : ${{ needs.prepare.outputs.Deploy == 'true' }}
3064 working-directory : ./src/Blazor-ApexCharts-MAUI/bin/Release
3165 run : dotnet nuget push Blazor-ApexCharts-MAUI.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
You can’t perform that action at this time.
0 commit comments