Skip to content

Commit b251dfe

Browse files
committed
ci: remove obsolete NuGet packaging steps
Update CI and release workflows for the application-based repository by removing stale MyLibrary packaging and NuGet publishing steps. Container publishing remains handled by the GHCR workflow.
1 parent b19f7e4 commit b251dfe

2 files changed

Lines changed: 3 additions & 52 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI (Build, Test, Alpha Publish)
1+
name: CI (Build and Test)
22

33
on:
44
pull_request:
@@ -9,10 +9,9 @@ on:
99

1010
permissions:
1111
contents: read
12-
packages: write
1312

1413
jobs:
15-
build-test-pack:
14+
build-test:
1615
runs-on: ubuntu-latest
1716
env:
1817
working-directory: ${{ github.workspace }}
@@ -50,27 +49,7 @@ jobs:
5049
- name: Build
5150
run: dotnet build --configuration Release --no-restore
5251
working-directory: '${{ env.working-directory }}'
53-
52+
5453
- name: Test
5554
run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage"
5655
working-directory: '${{ env.working-directory }}'
57-
58-
- name: Pack (Pre-release or Alpha)
59-
if: ${{ steps.gitversion.outputs.PreReleaseTag != '' && github.ref_type == 'branch' && github.ref != 'refs/heads/main' }}
60-
run: |
61-
dotnet pack src/MyLibrary/MyLibrary.csproj \
62-
-c Release -o artifacts \
63-
/p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }}
64-
65-
- name: Add GitHub Packages Source
66-
if: ${{ steps.gitversion.outputs.PreReleaseTag != '' && github.ref_type == 'branch' && github.ref != 'refs/heads/main' }}
67-
run: |
68-
dotnet nuget add source \
69-
--username $GITHUB_ACTOR \
70-
--password ${{ secrets.GITHUB_TOKEN }} \
71-
--store-password-in-clear-text \
72-
--name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
73-
74-
- name: Publish Alpha to GitHub Packages
75-
if: ${{ steps.gitversion.outputs.PreReleaseTag != '' && github.ref_type == 'branch' && github.ref != 'refs/heads/main' }}
76-
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate

.github/workflows/release.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99

1010
permissions:
1111
contents: write
12-
packages: write
1312

1413
jobs:
1514
release:
@@ -62,12 +61,6 @@ jobs:
6261
run: dotnet test -c Release --no-build
6362
working-directory: '${{ env.working-directory }}'
6463

65-
- name: Pack Stable
66-
run: |
67-
dotnet pack src/MyLibrary/MyLibrary.csproj \
68-
-c Release -o artifacts \
69-
/p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }}
70-
7164
- name: Create Tag (if missing)
7265
run: |
7366
TAG="v${{ steps.gitversion.outputs.MajorMinorPatch }}"
@@ -77,24 +70,3 @@ jobs:
7770
git tag "$TAG"
7871
git push origin "$TAG"
7972
fi
80-
81-
- name: Add GitHub Packages Source
82-
run: |
83-
dotnet nuget add source \
84-
--username $GITHUB_ACTOR \
85-
--password ${{ secrets.GITHUB_TOKEN }} \
86-
--store-password-in-clear-text \
87-
--name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
88-
89-
- name: Publish to GitHub Packages
90-
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate
91-
92-
- name: Publish to NuGet
93-
if: ${{ startsWith(github.head_ref, 'release/')}}
94-
env:
95-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
96-
run: |
97-
dotnet nuget push "artifacts/*.nupkg" \
98-
--api-key "$NUGET_API_KEY" \
99-
--source https://api.nuget.org/v3/index.json \
100-
--skip-duplicate

0 commit comments

Comments
 (0)