Skip to content

Commit

Permalink
update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielklecha committed Aug 17, 2024
1 parent b9f163a commit 0793b28
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Replace Version in csproj files
run: |
tag=$(echo "${{ github.ref_name }}" | sed 's/^v//')
find . -type f -name "*.csproj" -exec sed -i "s/<Version>.*<\/Version>/<Version>${tag}<\/Version>/g" {} \;
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -23,6 +27,14 @@ jobs:
run: dotnet test --configuration Release --no-build
- name: Pack
run: dotnet pack SharpIpp/SharpIpp.csproj --configuration Release --no-build
- name: Publish
- name: Publish to NuGet
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGETAPIKEY }}
- name: Publish to GitHub Packages
run: dotnet nuget push **/*.nupkg --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag=${{ github.ref_name }}
gh release create "$tag" --generate-notes
2 changes: 1 addition & 1 deletion SharpIpp/SharpIpp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<RepositoryType>git</RepositoryType>
<Product>SharpIppNext</Product>
<PackageId>SharpIppNext</PackageId>
<Version>1.0.5.0</Version>
<Version>1.0.0.0</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down

0 comments on commit 0793b28

Please sign in to comment.