-
Notifications
You must be signed in to change notification settings - Fork 247
Update GitHub Actions workflows #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Daily Build | ||
| # This job builds and publishes to GitHub Packages. | ||
| # It uses branch selected with workflow dispatch | ||
| # It depends on the included tests job to complete successfully. | ||
| on: | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| test_and_publish: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Fetch all history for all tags and branches | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: | | ||
| 8.0.x | ||
| 6.0.x | ||
| 3.1.x | ||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Set version ''5.0.0-daily' variable | ||
| run: | | ||
| Version='5.0.0-daily' | ||
| echo "VERSION=$Version" >> $GITHUB_ENV | ||
| echo "Version: $Version" | ||
| - name: Get commit hash | ||
| run: | | ||
| COMMIT_HASH=$(git rev-parse --short HEAD) | ||
| echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV | ||
| echo "Commit Hash: $COMMIT_HASH" | ||
| - name: Build Test | ||
| run: dotnet build --no-restore --configuration Release -p:Nullable=disable -p:nowarn=1591 | ||
| - name: Test | ||
| run: dotnet test --no-build --configuration Release --verbosity normal | ||
| - name: Build and pack daily build | ||
| run: | | ||
| dotnet build --no-restore --configuration Release Ical.Net/Ical.Net.csproj -p:Version=${{env.VERSION}} -p:FileVersion=${{env.VERSION}}.${{github.run_number}} -p:VersionSuffix=${{env.COMMIT_HASH}} -p:Nullable=disable -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:ContinuousIntegrationBuild=true | ||
| dotnet pack --configuration Release Ical.Net/Ical.Net.csproj -p:Version=${{env.VERSION}} -p:PackageReleaseNotes="Commit: ${{env.COMMIT_HASH}}" -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --no-build -p:PackageVersion=${{env.VERSION}}.${{github.run_number}} | ||
| - name: Store artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ICal.Net_pkg_${{env.VERSION}}.${{github.run_number}} | ||
| path: | | ||
| Ical.Net/bin/Release/**/*.nupkg | ||
| Ical.Net/bin/Release/**/*.snupkg | ||
| - name: Push package to GitHub Packages | ||
| run: dotnet nuget push Ical.Net/bin/Release/Ical.Net.${{env.VERSION}}.${{github.run_number}}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we remove this test which is "on hold" since 2016
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has been fixed in the meantime, maybe with #659. After tweaking the test a little, it seems to succeed: