Skip to content

Commit

Permalink
Build: Fix invalid version string in assembly info for dotnet pack (M…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikes-gh authored May 14, 2024
1 parent 3652764 commit 9587f37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deploy-mudblazor-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ jobs:

- name: VERSION to job output
id: output-version
run: |
echo "VERSION=${{ env.VERSION }}" >> $GITHUB_OUTPUT
run: echo "VERSION=${{ env.VERSION }}" >> $GITHUB_OUTPUT

deploy-nuget:
name: Deploy mudblazor nuget to nuget.org
needs: get-version
runs-on: ubuntu-latest
env:
ASSEMBLY_VERSION: 1.0.0
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -53,8 +54,13 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
- name: Assembly version
run: |
PACKAGE_VERSION="${{ needs.get-version.outputs.VERSION }}"
ASSEMBLY_VERSION=$(echo $PACKAGE_VERSION | sed 's/-preview//')
echo "ASSEMBLY_VERSION=$ASSEMBLY_VERSION" >> $GITHUB_ENV
- name: Pack nuget package
run: dotnet pack -c Release --output nupkgs /p:PackageVersion=${{ needs.get-version.outputs.VERSION }} /p:AssemblyVersion=${{ needs.get-version.outputs.VERSION }} /p:Version=${{ needs.get-version.outputs.VERSION }}
run: dotnet pack -c Release --output nupkgs /p:PackageVersion=${{ needs.get-version.outputs.VERSION }} /p:AssemblyVersion=${{ env.ASSEMBLY_VERSION }} /p:Version=${{ env.ASSEMBLY_VERSION }}
working-directory: ./src/MudBlazor
- name: Publish nuget package
run: dotnet nuget push nupkgs/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-mudblazor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:

- name: VERSION to job output
id: output-version
run: |
echo "VERSION=${{ env.VERSION }}" >> $GITHUB_OUTPUT
run: echo "VERSION=${{ env.VERSION }}" >> $GITHUB_OUTPUT

deploy-web-app:
name: Deploy web app to mudblazor.com
Expand Down
3 changes: 0 additions & 3 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ dotnet_diagnostic.IDE0056.severity = none
dotnet_diagnostic.IDE0057.severity = none
# BL0007 Component Parameters must be auto props
dotnet_diagnostic.BL0007.severity = suggestion
# CS7035 The specified version string does not conform to the recommended format - major.minor.build.revision
# Needed to pack preview versions of the nuget
dotnet_diagnostic.CS7035.severity = none

[*]
end_of_line = lf

0 comments on commit 9587f37

Please sign in to comment.