From bd74f2c268c960f552fb18ba8f29532fe41e20d7 Mon Sep 17 00:00:00 2001 From: Santosh Dahal Date: Sat, 7 Dec 2024 17:25:21 +0545 Subject: [PATCH] fix: update ci script --- .../{sample-ci.yml => build-maui-app-ci.yml} | 8 ++--- .../{package-ci.yml => build-package-ci.yml} | 0 .github/workflows/release-nuget.yml | 36 ------------------- 3 files changed, 3 insertions(+), 41 deletions(-) rename .github/workflows/{sample-ci.yml => build-maui-app-ci.yml} (89%) rename .github/workflows/{package-ci.yml => build-package-ci.yml} (100%) delete mode 100644 .github/workflows/release-nuget.yml diff --git a/.github/workflows/sample-ci.yml b/.github/workflows/build-maui-app-ci.yml similarity index 89% rename from .github/workflows/sample-ci.yml rename to .github/workflows/build-maui-app-ci.yml index 6506902..71c690e 100644 --- a/.github/workflows/sample-ci.yml +++ b/.github/workflows/build-maui-app-ci.yml @@ -1,16 +1,14 @@ -name: Build Sample for CI +name: Build MAUI APP on: push: branches: - - "main" - - "develop" + - "main" paths-ignore: - "**.md" pull_request: branches: - - "main" - - "develop" + - "main" env: BUILD_CONFIGURATION: Release diff --git a/.github/workflows/package-ci.yml b/.github/workflows/build-package-ci.yml similarity index 100% rename from .github/workflows/package-ci.yml rename to .github/workflows/build-package-ci.yml diff --git a/.github/workflows/release-nuget.yml b/.github/workflows/release-nuget.yml deleted file mode 100644 index 5e9211f..0000000 --- a/.github/workflows/release-nuget.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Create a (Pre)release on NuGet - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" - -jobs: - release-nuget: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - - name: Verify commit exists in origin/main - run: | - git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* - git branch --remote --contains | grep origin/main - - - name: Get version information from tag - id: get_version - run: | - $version="${{github.ref_name}}".TrimStart("v") - "version-without-v=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - - - name: Install .NET MAUI Workload - run: dotnet workload install maui - - - name: Pack - run: dotnet pack src\MAUIWifiManager\MAUIWifiManager.csproj -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }} - - - name: Push - run: dotnet nuget push src\MAUIWifiManager\bin\Release\MAUIWifiManager.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} - env: - GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}