Skip to content

Commit a1daae6

Browse files
authored
Merge pull request #5 from Ten-James/improve-cicd4
Improving CICD
2 parents 78a54a5 + d3daace commit a1daae6

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,27 @@ jobs:
182182
echo "package_path=$pkg" >> $GITHUB_OUTPUT
183183
echo "package_name=$(basename $pkg)" >> $GITHUB_OUTPUT
184184
185+
- name: Publish to NuGet
186+
env:
187+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
188+
run: |
189+
if [ -z "$NUGET_API_KEY" ]; then
190+
echo "NUGET_API_KEY not set - skipping publish"
191+
exit 0
192+
fi
193+
dotnet nuget push ./nupkgs/*.nupkg -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json --skip-duplicate
194+
185195
- name: Create GitHub Release for tag
186196
id: create_release
187197
uses: actions/create-release@v1
198+
env:
199+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188200
with:
189201
tag_name: ${{ steps.vars.outputs.tag }}
190202
release_name: ${{ steps.vars.outputs.tag }}
191203
body: Release for tag ${{ steps.vars.outputs.tag }}
192204
draft: false
193205
prerelease: false
194-
token: ${{ secrets.GITHUB_TOKEN }}
195206

196207
- name: Upload nupkg to Release
197208
uses: actions/upload-release-asset@v1
@@ -201,12 +212,3 @@ jobs:
201212
asset_name: ${{ steps.find_pkg.outputs.package_name }}
202213
asset_content_type: application/octet-stream
203214

204-
- name: Publish to NuGet
205-
env:
206-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
207-
run: |
208-
if [ -z "$NUGET_API_KEY" ]; then
209-
echo "NUGET_API_KEY not set - skipping publish"
210-
exit 0
211-
fi
212-
dotnet nuget push ./nupkgs/*.nupkg -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json --skip-duplicate

TenJames.CompMap/TenJames.CompMap/TenJames.CompMap.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<PropertyGroup>
17-
<Version>0.0.6</Version>
17+
<Version>0.0.7</Version>
1818
<Title>Compiletime Mapper</Title>
1919
<Description>Map your object on compile time</Description>
2020
<PackageProjectUrl>https://github.com/Ten-James/CompMap</PackageProjectUrl>

0 commit comments

Comments
 (0)