-
Notifications
You must be signed in to change notification settings - Fork 1
Development build for publishing a rolling release of the executables #5
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
ed23209
8f5c9fa
b266a9e
b5a0a9a
0ce2341
3aee880
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,9 +3,7 @@ name: Build Windows EXEs | |||||
| on: | ||||||
| push: | ||||||
| branches: | ||||||
| - main | ||||||
| tags: | ||||||
| - 'v*' | ||||||
| - develop | ||||||
| pull_request: | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
|
|
@@ -87,8 +85,8 @@ jobs: | |||||
| if-no-files-found: error | ||||||
|
|
||||||
| release: | ||||||
| name: Publish Release | ||||||
| if: startsWith(github.ref, 'refs/tags/v') | ||||||
| name: Publish Rolling Release | ||||||
| if: github.ref == 'refs/heads/develop' | ||||||
| needs: build-windows-x64 | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
|
|
@@ -99,14 +97,35 @@ jobs: | |||||
| uses: actions/download-artifact@v4 | ||||||
| with: | ||||||
| name: fca-exes-windows-x64 | ||||||
| path: dist/windows-x64 | ||||||
|
|
||||||
| - name: Create Release and upload assets | ||||||
| - name: Remove existing rolling assets | ||||||
| shell: bash | ||||||
| run: | | ||||||
| if gh release view rolling --json assets -q '.assets[].name' > /tmp/rolling_assets.txt; then | ||||||
| cat /tmp/rolling_assets.txt | xargs -r -I {} gh release delete-asset rolling "{}" -y | ||||||
|
||||||
| cat /tmp/rolling_assets.txt | xargs -r -I {} gh release delete-asset rolling "{}" -y | |
| cat /tmp/rolling_assets.txt | tee /dev/stderr | xargs -r -I {} gh release delete-asset rolling "{}" -y |
Copilot
AI
Feb 16, 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.
The asset cleanup step uses the gh CLI with GITHUB_TOKEN to delete assets. The workflow correctly specifies permissions: contents: write for the release job, which is necessary for deleting assets and creating releases. However, consider adding error handling for the case where the token doesn't have sufficient permissions, as this could lead to silent failures in the asset deletion step while the release creation succeeds.
Copilot
AI
Feb 16, 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.
The workflow uses 'rolling' as a tag name for the rolling release. Ensure that there is no branch or other reference named 'rolling' in the repository, as this could create conflicts. Tag names and branch names share the same namespace in git refs. If a branch named 'rolling' exists, it could cause confusion or errors in git operations.
Copilot
AI
Feb 16, 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.
The release body references github.event.head_commit.message which may be null or unavailable in certain contexts (e.g., when triggered via workflow_dispatch). Consider adding a fallback or checking if the commit message exists before including it in the body. Alternatively, use a more robust approach like fetching the commit message explicitly or providing a default message.
Copilot
AI
Feb 16, 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.
Setting both prerelease: true and make_latest: true is unusual because it marks a prerelease (rolling build) as the "latest" release. This means users who download the "latest" release will get an unstable rolling build rather than the most recent stable release. While this may be intentional for providing easy access to bleeding edge builds, it could confuse users expecting "latest" to mean stable. Consider either: 1) using make_latest: 'false' and relying on the prerelease flag, or 2) documenting this behavior clearly in the repository's release documentation so users understand that "latest" refers to the rolling release.
| make_latest: true | |
| make_latest: false |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,135 @@ | ||||||
| name: Manual Release | ||||||
|
|
||||||
| on: | ||||||
| workflow_dispatch: | ||||||
| inputs: | ||||||
| release_tag: | ||||||
| description: "Release tag (e.g., v1.2.3)" | ||||||
| required: true | ||||||
| type: string | ||||||
| release_name: | ||||||
| description: "Release title" | ||||||
| required: true | ||||||
| type: string | ||||||
| release_notes: | ||||||
| description: "Release notes (optional; leave blank to auto-generate)" | ||||||
| required: false | ||||||
| type: string | ||||||
| prerelease: | ||||||
| description: "Mark this release as a prerelease" | ||||||
| required: true | ||||||
| type: boolean | ||||||
| default: false | ||||||
|
|
||||||
| jobs: | ||||||
| test: | ||||||
| name: Test (unittest + pytest) | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 10 | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| ref: ${{ github.ref }} | ||||||
|
||||||
|
|
||||||
| - name: Setup Python | ||||||
| uses: actions/setup-python@v5 | ||||||
| with: | ||||||
| python-version: '3.12' | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| working-directory: python | ||||||
| run: | | ||||||
| python -m pip install --upgrade pip | ||||||
| pip install -r requirements-build.txt | ||||||
| pip install pytest | ||||||
|
|
||||||
| - name: Run unit tests | ||||||
| working-directory: python | ||||||
| run: python -m unittest discover -s tests -v | ||||||
|
|
||||||
| - name: Run pytest | ||||||
| working-directory: python | ||||||
| run: pytest tests/ -v | ||||||
|
|
||||||
| build-windows-x64: | ||||||
| name: Build (windows-x64) | ||||||
| needs: test | ||||||
| runs-on: windows-latest | ||||||
| timeout-minutes: 30 | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| ref: ${{ github.ref }} | ||||||
|
||||||
|
|
||||||
| - name: Setup Python | ||||||
| uses: actions/setup-python@v5 | ||||||
| with: | ||||||
| python-version: '3.12' | ||||||
|
|
||||||
| - name: Install build dependencies | ||||||
| working-directory: python | ||||||
| run: | | ||||||
| python -m pip install --upgrade pip | ||||||
| python -m pip install -r requirements-build.txt | ||||||
|
|
||||||
| - name: Run parity smoke test | ||||||
| working-directory: python | ||||||
| run: | | ||||||
| python -m unittest tests.test_fca_unittest.TestFCAToolParity.test_tool_encode_decode_matches_standalone -v | ||||||
|
|
||||||
| - name: Ensure icon file exists | ||||||
| working-directory: python | ||||||
| run: | | ||||||
| if (!(Test-Path small-logo.ico)) { | ||||||
| python build_icon.py --input-file small-logo.png --output-file small-logo.ico | ||||||
| } | ||||||
|
|
||||||
| - name: Build executables | ||||||
| working-directory: python | ||||||
| run: | | ||||||
| python -m PyInstaller --clean --noconfirm --onefile --icon small-logo.ico --name fca-encode --distpath ../dist/windows-x64 fca_encode.py | ||||||
| python -m PyInstaller --clean --noconfirm --onefile --icon small-logo.ico --name fca-decode --distpath ../dist/windows-x64 fca_decode.py | ||||||
| python -m PyInstaller --clean --noconfirm --onefile --icon small-logo.ico --name fca-tool --distpath ../dist/windows-x64 fca_tool.py | ||||||
|
|
||||||
| - name: Upload artifacts | ||||||
| uses: actions/upload-artifact@v4 | ||||||
| with: | ||||||
| name: fca-exes-windows-x64 | ||||||
| path: dist/windows-x64 | ||||||
| if-no-files-found: error | ||||||
|
|
||||||
| release: | ||||||
| name: Publish Release | ||||||
| needs: build-windows-x64 | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: write | ||||||
|
|
||||||
| steps: | ||||||
| - name: Download windows-x64 artifacts | ||||||
| uses: actions/download-artifact@v4 | ||||||
| with: | ||||||
| name: fca-exes-windows-x64 | ||||||
| path: dist/windows-x64 | ||||||
|
|
||||||
| - name: Create release and upload assets | ||||||
| uses: softprops/action-gh-release@v2 | ||||||
| with: | ||||||
| tag_name: ${{ inputs.release_tag }} | ||||||
| name: ${{ inputs.release_name }} | ||||||
| target_commitish: ${{ github.sha }} | ||||||
|
Comment on lines
+122
to
+124
|
||||||
| body: ${{ inputs.release_notes }} | ||||||
| generate_release_notes: ${{ inputs.release_notes == '' }} | ||||||
|
||||||
| files: dist/windows-x64/* | ||||||
| overwrite_files: true | ||||||
| make_latest: true | ||||||
|
||||||
| make_latest: true | |
| make_latest: ${{ !inputs.prerelease }} |
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 condition
github.ref == 'refs/heads/develop'will prevent the release job from running on pull_request and workflow_dispatch events, even when they target the develop branch. This is correct behavior for the rolling release, but consider documenting this in comments or the workflow name to make it clear that rolling releases only happen on pushes to develop, not on PRs or manual triggers. The current setup is correct, but adding a comment would improve clarity.