-
Notifications
You must be signed in to change notification settings - Fork 239
Release testing #870
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
Release testing #870
Changes from all commits
09ec650
9d42095
a38dbf2
9320a89
ecc8f1c
f5d9981
4da9b26
25dff1d
b522526
6e6670d
0bfb41b
a46b001
d320345
42f6991
89438b2
78c6122
564f7ba
102df6b
e0f7288
3a3ef20
8d4b30c
227cfcd
533b2b0
153913a
5785687
1ae3da6
64f9406
81b858d
741c7f5
dbfb173
9cb35ae
7811918
80c9ca0
2bc0178
fb2b79d
f612a0b
acbf6c6
3346ce2
e501723
395d062
9a5ef17
2acb66d
5b1df09
8a64d5c
dc1dfd9
db86766
a83cda6
bf3dc40
0c2e998
671e59e
643564b
b6ea9f0
8bdf0b4
73fa000
fefc1f6
cf66b66
145e71e
6cceca4
e45f1a9
27029ba
c87d776
f5ac2b8
48db964
68014bc
2671740
4fecf85
c9d5643
5e6f58b
2e20b2c
814d751
d523053
3211558
dcedb46
b061e55
1b2ba95
881ca7a
ee76b6b
4045cc9
865db81
412b4fa
25648a9
c7a6a60
2dc0a19
2cd9938
247eaba
d4c778f
c350bfe
9f32f20
ec6dd89
7c07a78
ab3993f
d1bbb82
89ff9ad
77d8a37
1eed7ba
f676ba2
a8f526d
4ee9977
236f22a
39a833b
5a513f8
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,13 @@ | ||
| name: Conventional Commits | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Conventional Commits | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: webiny/action-conventional-commits@v1.3.0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,312 @@ | ||||||||||||||||||||||||||||
| name: Manually Triggered Desktop Release | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||
| actions: read | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||
| group: desktop-release-${{ github.ref }} | ||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||
| version-bump: | ||||||||||||||||||||||||||||
| description: 'The type of version bump (major, minor, or patch)' | ||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||
| default: 'patch' | ||||||||||||||||||||||||||||
| type: choice | ||||||||||||||||||||||||||||
| options: | ||||||||||||||||||||||||||||
| - patch | ||||||||||||||||||||||||||||
| - minor | ||||||||||||||||||||||||||||
| - major | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||
| version: | ||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||||
| new_version: ${{ steps.bump.outputs.new_version }} | ||||||||||||||||||||||||||||
| changelog: ${{ steps.changelog.outputs.clean_changelog }} | ||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Configure Git | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||||||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Compute New Version | ||||||||||||||||||||||||||||
| id: bump | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Fetch the latest tag from the repository | ||||||||||||||||||||||||||||
| LATEST_TAG=$(git tag --sort=-v:refname | head -n 1) | ||||||||||||||||||||||||||||
| if [[ -z "$LATEST_TAG" ]]; then | ||||||||||||||||||||||||||||
| LATEST_TAG="v0.0.0" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Parse the latest tag to get major, minor, and patch numbers | ||||||||||||||||||||||||||||
| if [[ "$LATEST_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then | ||||||||||||||||||||||||||||
| MAJOR=${BASH_REMATCH[1]} | ||||||||||||||||||||||||||||
| MINOR=${BASH_REMATCH[2]} | ||||||||||||||||||||||||||||
| PATCH=${BASH_REMATCH[3]} | ||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||
| echo "Could not parse latest tag: $LATEST_TAG. Starting from v0.0.0." | ||||||||||||||||||||||||||||
| MAJOR=0; MINOR=0; PATCH=0 | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Increment the version based on the manual input | ||||||||||||||||||||||||||||
| BUMP_TYPE="${{ github.event.inputs.version-bump }}" | ||||||||||||||||||||||||||||
| if [ "$BUMP_TYPE" == "major" ]; then | ||||||||||||||||||||||||||||
| MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 | ||||||||||||||||||||||||||||
| elif [ "$BUMP_TYPE" == "minor" ]; then | ||||||||||||||||||||||||||||
| MINOR=$((MINOR + 1)); PATCH=0 | ||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||
| PATCH=$((PATCH + 1)) | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| NEW_VERSION="v$MAJOR.$MINOR.$PATCH" | ||||||||||||||||||||||||||||
| VERSION_NO_V="$MAJOR.$MINOR.$PATCH" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||
| echo "version_no_v=$VERSION_NO_V" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||
| echo "New version will be: $NEW_VERSION" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Update Version Files | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| VERSION_NO_V="${{ steps.bump.outputs.version_no_v }}" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Update package.json | ||||||||||||||||||||||||||||
| jq --arg ver "$VERSION_NO_V" '.version = $ver' package.json > package.json.tmp | ||||||||||||||||||||||||||||
| mv package.json.tmp package.json | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Update src-tauri/tauri.conf.json | ||||||||||||||||||||||||||||
| jq --arg ver "$VERSION_NO_V" '.version = $ver' src-tauri/tauri.conf.json > src-tauri/tauri.conf.json.tmp | ||||||||||||||||||||||||||||
| mv src-tauri/tauri.conf.json.tmp src-tauri/tauri.conf.json | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Update src-tauri/Cargo.toml | ||||||||||||||||||||||||||||
| sed -i "s/^version = \".*\"/version = \"$VERSION_NO_V\"/" src-tauri/Cargo.toml | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| echo "Updated version files to $VERSION_NO_V" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Generate Changelog | ||||||||||||||||||||||||||||
| id: changelog | ||||||||||||||||||||||||||||
| uses: TriPSs/conventional-changelog-action@v6 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
| skip-on-empty: 'false' | ||||||||||||||||||||||||||||
| skip-commit: 'true' | ||||||||||||||||||||||||||||
| skip-version-file: 'true' | ||||||||||||||||||||||||||||
| skip-git-pull: 'true' | ||||||||||||||||||||||||||||
| skip-tag: 'true' | ||||||||||||||||||||||||||||
| git-push: 'false' | ||||||||||||||||||||||||||||
| output-file: 'false' | ||||||||||||||||||||||||||||
| release-count: 0 | ||||||||||||||||||||||||||||
| tag-prefix: 'v' | ||||||||||||||||||||||||||||
|
Comment on lines
+97
to
+110
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Example - uses: TriPSs/conventional-changelog-action@v6
with:
release-count: 0Source: TriPSs/conventional-changelog-action README (Inputs section). [1]
Setting 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Commit Version Bump | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| NEW_VERSION="${{ steps.bump.outputs.new_version }}" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml | ||||||||||||||||||||||||||||
| git commit -m "chore: bump version to $NEW_VERSION" | ||||||||||||||||||||||||||||
| git tag "$NEW_VERSION" | ||||||||||||||||||||||||||||
| git push origin HEAD:${{ github.ref_name }} | ||||||||||||||||||||||||||||
| git push origin "$NEW_VERSION" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| build-tauri: | ||||||||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||||||||
| needs: version | ||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||
| os: [ubuntu-latest, windows-2022, macos-latest] | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| ref: ${{ github.ref_name }} | ||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Pull latest changes | ||||||||||||||||||||||||||||
| run: git pull origin ${{ github.ref_name }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| node-version: 22 | ||||||||||||||||||||||||||||
|
Comment on lines
+140
to
+143
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check package.json for Node.js version requirements
if [ -f "package.json" ]; then
echo "=== package.json engines field ==="
jq '.engines' package.json 2>/dev/null || echo "No engines field found"
echo ""
echo "=== .nvmrc or .node-version ==="
cat .nvmrc 2>/dev/null || cat .node-version 2>/dev/null || echo "No version file found"
fiRepository: CircuitVerse/cv-frontend-vue Length of output: 166 🏁 Script executed: # Check other workflows and their Node.js versions
echo "=== All workflow files ==="
find .github/workflows -name "*.yml" -o -name "*.yaml" | head -20
echo ""
echo "=== Node versions in all workflows ==="
rg "node-version:" .github/workflows/ -A 1 -B 1Repository: CircuitVerse/cv-frontend-vue Length of output: 1070 Add explanatory comment for Node.js 22 usage in Tauri-Release workflow. Node.js 22 is used intentionally in multiple CI workflows (Tauri-testing.yml has an explicit comment "Use Node.js 22"), but Tauri-Release.yml lacks this explanation. Add a similar comment to clarify why Node.js 22 is required for the release build, especially since the project targets Node.js 18 for development (as confirmed by cross-env version constraints). 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Cache Node.js Dependencies | ||||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| path: ~/.npm | ||||||||||||||||||||||||||||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||||||||||||||||||||||||||||
| restore-keys: ${{ runner.os }}-node- | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Install Dependencies | ||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Setup Rust (stable) | ||||||||||||||||||||||||||||
| uses: dtolnay/rust-toolchain@stable | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Install Linux Dependencies (Ubuntu) | ||||||||||||||||||||||||||||
| if: matrix.os == 'ubuntu-latest' | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| sudo apt update | ||||||||||||||||||||||||||||
| sudo apt install -y libwebkit2gtk-4.1-dev \ | ||||||||||||||||||||||||||||
| build-essential \ | ||||||||||||||||||||||||||||
| curl \ | ||||||||||||||||||||||||||||
| wget \ | ||||||||||||||||||||||||||||
| file \ | ||||||||||||||||||||||||||||
| libxdo-dev \ | ||||||||||||||||||||||||||||
| libssl-dev \ | ||||||||||||||||||||||||||||
| libayatana-appindicator3-dev \ | ||||||||||||||||||||||||||||
| librsvg2-dev | ||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Install macOS Dependencies | ||||||||||||||||||||||||||||
| if: matrix.os == 'macos-latest' | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| brew update | ||||||||||||||||||||||||||||
| brew install pkg-config | ||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Install Windows Dependencies | ||||||||||||||||||||||||||||
| if: matrix.os == 'windows-2022' | ||||||||||||||||||||||||||||
| shell: powershell | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| choco install -y wixtoolset nsis webview2-runtime | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Cache Rust Dependencies | ||||||||||||||||||||||||||||
| uses: Swatinem/rust-cache@v2 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| workspaces: './src-tauri' | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Build Tauri App | ||||||||||||||||||||||||||||
| run: npm run tauri build | ||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # TODO: Add code signing steps here once certificates are obtained | ||||||||||||||||||||||||||||
| # - Windows: Sign .msi and .exe files with Authenticode via SignPath | ||||||||||||||||||||||||||||
| # - macOS: Sign .app bundles and .dmg with Apple Developer ID | ||||||||||||||||||||||||||||
| # - Linux: Sign .deb and .AppImage with GPG | ||||||||||||||||||||||||||||
| # Reference: Issue #631 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Upload Tauri Build Artifacts | ||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| name: Tauri Build Artifacts (${{ matrix.os }}) | ||||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||||
| src-tauri/target/release/bundle | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| create-release: | ||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||
| needs: [version, build-tauri] | ||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
| ref: ${{ github.ref_name }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Configure Git | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||||||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Update Repository Changelog | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||
| CHANGELOG_FILE="CHANGELOG.md" | ||||||||||||||||||||||||||||
| TEMP_CHANGELOG="$(mktemp)" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| cat <<'EOF' > "$TEMP_CHANGELOG" | ||||||||||||||||||||||||||||
| ${{ needs.version.outputs.changelog }} | ||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ -f "$CHANGELOG_FILE" ]; then | ||||||||||||||||||||||||||||
| printf "\n" >> "$TEMP_CHANGELOG" | ||||||||||||||||||||||||||||
| cat "$CHANGELOG_FILE" >> "$TEMP_CHANGELOG" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| mv "$TEMP_CHANGELOG" "$CHANGELOG_FILE" | ||||||||||||||||||||||||||||
|
Comment on lines
+225
to
+240
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heredoc with workflow output may have issues with special characters. The changelog output is inserted directly into a heredoc. If the changelog contains characters like ♻️ Alternative using printf with proper escaping - name: Update Repository Changelog
run: |
set -euo pipefail
CHANGELOG_FILE="CHANGELOG.md"
TEMP_CHANGELOG="$(mktemp)"
- cat <<'EOF' > "$TEMP_CHANGELOG"
- ${{ needs.version.outputs.changelog }}
- EOF
+ # Write changelog content safely
+ printf '%s\n' '${{ needs.version.outputs.changelog }}' > "$TEMP_CHANGELOG"
if [ -f "$CHANGELOG_FILE" ]; then
printf "\n" >> "$TEMP_CHANGELOG"
cat "$CHANGELOG_FILE" >> "$TEMP_CHANGELOG"
fi
mv "$TEMP_CHANGELOG" "$CHANGELOG_FILE"Note: Even this approach may have issues. Consider writing the changelog to a file in a previous step using GitHub Actions' built-in file writing capabilities. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Commit and Push Changelog | ||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Pull latest changes (version job pushed new commits) | ||||||||||||||||||||||||||||
| git pull origin ${{ github.ref_name }} --rebase | ||||||||||||||||||||||||||||
|
Comment on lines
+248
to
+249
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If the version job's commit conflicts with any concurrent changes to the branch, the rebase will fail. Consider using ♻️ Alternative: use merge instead of rebase # Pull latest changes (version job pushed new commits)
- git pull origin ${{ github.ref_name }} --rebase
+ git pull origin ${{ github.ref_name }} --no-rebase🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if git diff --quiet -- CHANGELOG.md; then | ||||||||||||||||||||||||||||
| echo "No changelog updates to commit." | ||||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| git add CHANGELOG.md | ||||||||||||||||||||||||||||
| git commit -m "chore: update changelog for ${{ needs.version.outputs.new_version }}" | ||||||||||||||||||||||||||||
| git push origin HEAD:${{ github.ref_name }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Download all build artifacts | ||||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| path: artifacts | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Prepare Release Assets | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| mkdir -p release-assets | ||||||||||||||||||||||||||||
| find artifacts -type f \( -name "*.deb" -o -name "*.AppImage" -o -name "*.msi" -o -name "*.dmg" \) -exec cp {} release-assets/ \; || true | ||||||||||||||||||||||||||||
|
Comment on lines
+265
to
+268
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Silent failure on missing release assets. The ♻️ Add validation after find command - name: Prepare Release Assets
run: |
mkdir -p release-assets
- find artifacts -type f \( -name "*.deb" -o -name "*.AppImage" -o -name "*.msi" -o -name "*.dmg" \) -exec cp {} release-assets/ \; || true
+ find artifacts -type f \( -name "*.deb" -o -name "*.AppImage" -o -name "*.msi" -o -name "*.dmg" \) -exec cp {} release-assets/ \;
+
+ # Validate that we have at least some release assets
+ if [ -z "$(ls -A release-assets 2>/dev/null)" ]; then
+ echo "::warning::No release assets found. Check build artifacts."
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ -d "artifacts/Tauri Build Artifacts (macos-latest)/src-tauri/target/release/bundle/macos" ]; then | ||||||||||||||||||||||||||||
| MACOS_BUNDLE_DIR="artifacts/Tauri Build Artifacts (macos-latest)/src-tauri/target/release/bundle/macos" | ||||||||||||||||||||||||||||
| cd "$MACOS_BUNDLE_DIR" | ||||||||||||||||||||||||||||
| shopt -s nullglob | ||||||||||||||||||||||||||||
| apps=( *.app ) | ||||||||||||||||||||||||||||
| if [ ${#apps[@]} -gt 0 ]; then | ||||||||||||||||||||||||||||
| for app in "${apps[@]}"; do | ||||||||||||||||||||||||||||
| zip -r "$GITHUB_WORKSPACE/release-assets/${app%.app}.zip" "$app" | ||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
| cd - | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| echo "Prepared release assets:" | ||||||||||||||||||||||||||||
| ls -l release-assets/ | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Install GitHub CLI | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) | ||||||||||||||||||||||||||||
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||||||||||||||||||||||||||||
| && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||||||||||||||||||||||||||||
| && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||||||||||||||||||||||||||||
| && sudo apt update \ | ||||||||||||||||||||||||||||
| && sudo apt install gh -y | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Create GitHub Release | ||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| NEW_VERSION="${{ needs.version.outputs.new_version }}" | ||||||||||||||||||||||||||||
| echo "Creating release: $NEW_VERSION" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| CHANGELOG_NOTES_FILE="RELEASE_NOTES.md" | ||||||||||||||||||||||||||||
| cat <<'EOF' > "$CHANGELOG_NOTES_FILE" | ||||||||||||||||||||||||||||
| ${{ needs.version.outputs.changelog }} | ||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| gh release create "$NEW_VERSION" \ | ||||||||||||||||||||||||||||
| --title "CircuitVerse Desktop $NEW_VERSION" \ | ||||||||||||||||||||||||||||
| --notes-file "$CHANGELOG_NOTES_FILE" \ | ||||||||||||||||||||||||||||
| release-assets/* | ||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||||||||||||||||||
| name: Desktop Simulator Tests | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| on: | ||||||||||||||||||||||
| push: | ||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||
| - cron: '16 5 * * 0' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||
| desktop-simulator-tests: | ||||||||||||||||||||||
| name: Desktop Simulator Tests | ||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| steps: | ||||||||||||||||||||||
| - name: Checkout Repository | ||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| node-version: 22 # Use Node.js 22 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Install Dependencies | ||||||||||||||||||||||
| run: npm install | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Install Rust | ||||||||||||||||||||||
| uses: actions-rs/toolchain@v1 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| toolchain: stable | ||||||||||||||||||||||
| override: true | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Comment on lines
+28
to
+33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat .github/workflows/Tauri-testing.yml | head -50Repository: CircuitVerse/cv-frontend-vue Length of output: 1227 🌐 Web query:
💡 Result:
Recommended replacements (maintained):
Citations:
🌐 Web query:
💡 Result: A commonly recommended drop-in replacement is:
Example: - uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable # or omit if you have rust-toolchain(.toml)
components: clippy,rustfmt
target: wasm32-unknown-unknownSources: [1] (github.com) Citations: Update deprecated Rust toolchain action (archived repository with unsupported Node12 runtime).
🛠️ Suggested replacement - name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.10)29-29: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||
| - name: Install Tauri CLI | ||||||||||||||||||||||
| run: cargo install tauri-cli | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Debug Environment | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| echo "Node.js version: $(node -v)" | ||||||||||||||||||||||
| echo "npm version: $(npm -v)" | ||||||||||||||||||||||
| echo "Rust version: $(rustc --version)" | ||||||||||||||||||||||
| echo "Tauri CLI version: $(tauri --version)" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Start Mock API | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| npm install -g json-server | ||||||||||||||||||||||
| json-server --watch mock-api.json --port 3000 & | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Build Tauri App using build-desktop.js | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| node build-desktop.js | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,3 +55,4 @@ jobs: | |
| uses: github/codeql-action/analyze@v3 | ||
| with: | ||
| category: "/language:${{matrix.language}}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,3 +48,4 @@ jobs: | |
| with: | ||
| sarif_file: eslint-results.sarif | ||
| wait-for-processing: true | ||
|
|
||
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.
sedpattern may update the wrong version field in Cargo.toml.The pattern
^version = ".*"will match the firstversionline in Cargo.toml, which should be the package version. However, if the file structure changes or there are commented version lines, this could update the wrong field. Consider making the pattern more specific or using a dedicated tool likecargo set-versionfromcargo-edit.♻️ Alternative using toml-cli or more specific sed
📝 Committable suggestion
🤖 Prompt for AI Agents