Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new GitHub Actions workflow for automating releases.
- Adds a release workflow file to automate branch creation, version updates in package.json and csproj files, building with dotnet, and creating pull requests.
- Automates version bumping via shell commands and commits changes including build artifacts.
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:80
- [nitpick] Committing binary files like DLLs to version control is generally discouraged; please confirm if including these build artifacts is intentional or consider excluding them.
./bin/LocalPrefs.Core/LocalPrefs.Core.dll
| fetch-depth: 0 | ||
| - name: create branch | ||
| run: | | ||
| BRANCH="feature/v${{ github.event.inputs.version }}" |
There was a problem hiding this comment.
[nitpick] For consistency, consider assigning the version to a variable (e.g., VERSION) as done later in the workflow and then using it to construct the branch name. This makes the script easier to maintain.
Suggested change
| BRANCH="feature/v${{ github.event.inputs.version }}" | |
| VERSION="${{ github.event.inputs.version }}" | |
| BRANCH="feature/v$VERSION" |
|
|
||
| for FILE in "${FILES[@]}"; do | ||
| echo "Updating $FILE" | ||
| jq --arg ver "$VERSION" '.version = $ver' "$FILE" > tmp.$$.json && mv tmp.$$.json "$FILE" |
There was a problem hiding this comment.
[nitpick] Consider using a safer temporary file creation mechanism (such as 'mktemp') instead of 'tmp.$$.json' for improved robustness and to avoid potential file collisions.
Suggested change
| jq --arg ver "$VERSION" '.version = $ver' "$FILE" > tmp.$$.json && mv tmp.$$.json "$FILE" | |
| TMPFILE=$(mktemp) && jq --arg ver "$VERSION" '.version = $ver' "$FILE" > "$TMPFILE" && mv "$TMPFILE" "$FILE" |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.