Skip to content

ci: add release.yml#10

Merged
kochounoyume merged 1 commit intomainfrom
feature/ci-pr-versionup
Jun 12, 2025
Merged

ci: add release.yml#10
kochounoyume merged 1 commit intomainfrom
feature/ci-pr-versionup

Conversation

@kochounoyume
Copy link
Member

No description provided.

@kochounoyume kochounoyume self-assigned this Jun 12, 2025
Copilot AI review requested due to automatic review settings June 12, 2025 14:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}"
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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"

Copilot uses AI. Check for mistakes.

for FILE in "${FILES[@]}"; do
echo "Updating $FILE"
jq --arg ver "$VERSION" '.version = $ver' "$FILE" > tmp.$$.json && mv tmp.$$.json "$FILE"
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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"

Copilot uses AI. Check for mistakes.
@kochounoyume kochounoyume merged commit a9a7d40 into main Jun 12, 2025
4 checks passed
@kochounoyume kochounoyume deleted the feature/ci-pr-versionup branch June 12, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants