Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions .github/workflows/release-maui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,53 @@ on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
inputs:
version:
description: Version
required: true
type: string
deploy:
description: Deploy
required: true
type: boolean
default: false
name: Create Release MAUI
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
Version: ${{ steps.set-values.outputs.Version }}
Deploy: ${{ steps.set-values.outputs.Deploy }}
defaults:
run:
shell: bash
steps:
- name: Update Environment Variables
id: set-values
run: |
if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then
echo "Version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
echo "Deploy=${{ github.event.inputs.deploy }}" >> "$GITHUB_OUTPUT"
else
echo "Version=${GITHUB_REF##*/v}" >> "$GITHUB_OUTPUT"
echo "Deploy=true" >> "$GITHUB_OUTPUT"
fi
build:
needs: [ prepare ]
name: Create Release
runs-on: windows-2022
timeout-minutes: 30
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: |
8.0.x
9.0.x

- name: Install dependencies
run: |
Expand All @@ -24,8 +57,9 @@ jobs:

- name: Dotnet Pack
working-directory: ./src/Blazor-ApexCharts-MAUI
run: dotnet pack -c Release -p:Version=${GITHUB_REF##*/v}
run: dotnet pack -c Release -p:Version=${{ needs.prepare.outputs.Version }} -p:AssemblyVersion=${{ needs.prepare.outputs.Version }}

- name: Dotnet Nuget Push
if: ${{ needs.prepare.outputs.Deploy == 'true' }}
working-directory: ./src/Blazor-ApexCharts-MAUI/bin/Release
run: dotnet nuget push Blazor-ApexCharts-MAUI.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}