-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add GitHub Actions automated build workflow #45
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||
| name: Build | ||||||||
|
|
||||||||
| on: | ||||||||
| push: | ||||||||
| branches: | ||||||||
| - main | ||||||||
| - master | ||||||||
| pull_request: | ||||||||
| branches: | ||||||||
| - main | ||||||||
| - master | ||||||||
| release: | ||||||||
| types: [published] | ||||||||
|
|
||||||||
| env: | ||||||||
| PROJECT_PATH: src/WutheringWavesTool/Haiyu.csproj | ||||||||
| PUBLISH_DIR: src/WutheringWavesTool/bin/win-x64/publish | ||||||||
|
|
||||||||
| jobs: | ||||||||
| build: | ||||||||
| runs-on: windows-latest | ||||||||
| permissions: | ||||||||
| contents: read | ||||||||
|
|
||||||||
| steps: | ||||||||
| - name: Checkout | ||||||||
| uses: actions/checkout@v4 | ||||||||
|
|
||||||||
| - name: Setup .NET | ||||||||
| uses: actions/setup-dotnet@v4 | ||||||||
| with: | ||||||||
| dotnet-version: '10.0.x' | ||||||||
|
|
||||||||
| - name: Restore | ||||||||
| run: dotnet restore ${{ env.PROJECT_PATH }} -p:Platform=x64 | ||||||||
|
|
||||||||
| - name: Publish | ||||||||
| run: dotnet publish ${{ env.PROJECT_PATH }} -p:PublishProfile=win-x64 | ||||||||
|
||||||||
| run: dotnet publish ${{ env.PROJECT_PATH }} -p:PublishProfile=win-x64 | |
| run: dotnet publish ${{ env.PROJECT_PATH }} -p:PublishProfile=win-x64 --no-restore |
Copilot
AI
Mar 23, 2026
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.
actions/upload-artifact defaults to only warning when the path matches no files, which can let the job succeed while producing no artifact if the publish output path ever changes. Consider setting if-no-files-found: error to fail fast when the publish directory is missing/empty.
| path: ${{ env.PUBLISH_DIR }} | |
| path: ${{ env.PUBLISH_DIR }} | |
| if-no-files-found: error |
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.
The workflow publishes but never runs the repo’s unit tests (there is a test project under
src/Project.Test). Consider adding adotnet teststep (typically after restore/build) so CI catches regressions before publishing artifacts.