Skip to content

Commit 0a1ccf8

Browse files
Fix workflow files (#235)
- Fix CI so that the self-diagnostic is done on its own version, not the latest released version.
1 parent 7014a47 commit 0a1ccf8

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,31 @@ jobs:
4242
with:
4343
name: code-coverage-report
4444
path: Coverlet-html
45-
- name: Self check
45+
- name: Publish local NuGet packages
46+
run: |
47+
dotnet publish StyleChecker/StyleChecker/StyleChecker.csproj \
48+
--artifacts-path nuget-source \
49+
--configuration Release
50+
# The nupkg file will be created in ./nuget-source/package/release
51+
- name: install xsltproc
4652
run: |
4753
sudo apt-get update
4854
sudo apt-get install xsltproc
49-
xsltproc transform.xslt StyleChecker/StyleChecker/StyleChecker.csproj > 1.xml
50-
xsltproc transform.xslt StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj > 2.xml
55+
- name: Rewrite package names in project files
56+
run: |
57+
xsltproc transform.xslt \
58+
StyleChecker/StyleChecker/StyleChecker.csproj > 1.xml
59+
xsltproc transform.xslt \
60+
StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj > 2.xml
5161
cp 1.xml StyleChecker/StyleChecker/StyleChecker.csproj
5262
cp 2.xml StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj
53-
dotnet add StyleChecker/StyleChecker/StyleChecker.csproj package StyleChecker --version ${{ env.STYLECHECKER_VERSION }}
54-
dotnet add StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj package StyleChecker --version ${{ env.STYLECHECKER_VERSION }}
63+
- name: Self check
64+
run: |
65+
dotnet add StyleChecker/StyleChecker/StyleChecker.csproj \
66+
package StyleChecker --source nuget-source/package/release \
67+
--prerelease
68+
dotnet add StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj \
69+
package StyleChecker --source nuget-source/package/release \
70+
--prerelease
71+
dotnet clean
5572
dotnet build --configuration Release
56-
env:
57-
STYLECHECKER_VERSION: 2.1.0-beta

0 commit comments

Comments
 (0)