-
Notifications
You must be signed in to change notification settings - Fork 155
dart_skills_lint v0.4 prep: native binary preview track #158
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
Merged
reidbaker
merged 11 commits into
flutter:main
from
reidbaker:binary-distribution-preview
Jun 17, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
387887d
Add v0.4.0-dev.1 preview: native binary distribution
reidbaker d527f26
Bump GitHub Actions to Node 24-compatible versions
reidbaker d1f1dd4
Update README install section for v0.4.0-dev.1 binary preview
reidbaker 76ff632
Address Gemini review on install.sh
reidbaker 4120617
Address self-review on PR #158
reidbaker 3130b34
Refactor install.sh tests to be robust, add Linux tests and missing e…
reidbaker c82236f
Fix custom linter warnings and format test file
reidbaker 20fbf39
Fix omit_obvious_local_variable_types analyzer warning in test
reidbaker ef84751
Pin softprops/action-gh-release to commit SHA to resolve review feedback
reidbaker 83d4c2d
Pin VeryGoodOpenSource/very_good_coverage to commit SHA
reidbaker e578b30
Add tag mapping comments to pinned action commit SHAs
reidbaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| name: dart_skills_lint release | ||
| permissions: read-all | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'dart_skills_lint-v*' | ||
|
|
||
| jobs: | ||
| build_binaries: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: macos-14 | ||
| target: macos-arm64 | ||
| - os: macos-13 | ||
| target: macos-x64 | ||
| - os: ubuntu-22.04 | ||
| target: linux-x64 | ||
| - os: ubuntu-22.04-arm | ||
| target: linux-arm64 | ||
| runs-on: ${{ matrix.os }} | ||
| defaults: | ||
| run: | ||
| working-directory: tool/dart_skills_lint | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: dart-lang/setup-dart@v1 | ||
| with: | ||
| sdk: stable | ||
|
|
||
| - name: Resolve dependencies | ||
| run: dart pub get | ||
|
|
||
| - name: Compile native binary | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p dist | ||
| dart compile exe bin/cli.dart -o "dist/dart_skills_lint-${TARGET}" | ||
| chmod +x "dist/dart_skills_lint-${TARGET}" | ||
| env: | ||
| TARGET: ${{ matrix.target }} | ||
|
|
||
| - name: Smoke-test binary | ||
| run: ./dist/dart_skills_lint-${{ matrix.target }} --help | ||
|
|
||
| - name: Package and hash | ||
| run: | | ||
| set -euo pipefail | ||
| cd dist | ||
| tar -czf "dart_skills_lint-${TARGET}.tar.gz" "dart_skills_lint-${TARGET}" | ||
| if command -v sha256sum >/dev/null 2>&1; then | ||
| sha256sum "dart_skills_lint-${TARGET}.tar.gz" > "dart_skills_lint-${TARGET}.tar.gz.sha256" | ||
| else | ||
| shasum -a 256 "dart_skills_lint-${TARGET}.tar.gz" > "dart_skills_lint-${TARGET}.tar.gz.sha256" | ||
| fi | ||
| env: | ||
| TARGET: ${{ matrix.target }} | ||
|
|
||
| - name: Upload binary artifact | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: dart_skills_lint-${{ matrix.target }} | ||
| path: | | ||
| tool/dart_skills_lint/dist/dart_skills_lint-${{ matrix.target }}.tar.gz | ||
| tool/dart_skills_lint/dist/dart_skills_lint-${{ matrix.target }}.tar.gz.sha256 | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
|
|
||
| release: | ||
| needs: build_binaries | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Download all binary artifacts | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| path: dist | ||
| merge-multiple: true | ||
|
|
||
| - name: Build SHA256SUMS aggregate file | ||
| working-directory: dist | ||
| run: | | ||
| set -euo pipefail | ||
| : > SHA256SUMS | ||
| for f in *.tar.gz.sha256; do | ||
| cat "$f" >> SHA256SUMS | ||
| done | ||
| rm -f *.tar.gz.sha256 | ||
| echo "--- SHA256SUMS ---" | ||
| cat SHA256SUMS | ||
|
|
||
| - name: Extract release metadata | ||
| id: meta | ||
| run: | | ||
| set -euo pipefail | ||
| # Tag pattern: dart_skills_lint-v<VERSION>. Strip prefix to get the version. | ||
| TAG="${GITHUB_REF_NAME}" | ||
| VERSION="${TAG#dart_skills_lint-v}" | ||
| if [ "$VERSION" = "$TAG" ]; then | ||
| echo "ERROR: tag '$TAG' does not match expected pattern 'dart_skills_lint-v<VERSION>'" >&2 | ||
| exit 1 | ||
| fi | ||
| # Verify pubspec matches. | ||
| PUBSPEC_VERSION=$(awk -F': *' '/^version:/ {print $2; exit}' tool/dart_skills_lint/pubspec.yaml) | ||
| if [ "$VERSION" != "$PUBSPEC_VERSION" ]; then | ||
| echo "ERROR: tag version '$VERSION' does not match pubspec.yaml version '$PUBSPEC_VERSION'" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| # Pre-release detection for the GitHub Release flag. | ||
| case "$VERSION" in | ||
| *-dev.*|*-alpha.*|*-beta.*|*-rc.*|*-preview.*) echo "prerelease=true" >> "$GITHUB_OUTPUT" ;; | ||
| *) echo "prerelease=false" >> "$GITHUB_OUTPUT" ;; | ||
| esac | ||
|
|
||
| - name: Extract release notes from CHANGELOG | ||
| run: | | ||
| set -euo pipefail | ||
| awk -v ver="## ${VERSION}" ' | ||
| $0 == ver { found = 1; next } | ||
| /^## / && found { exit } | ||
| found { print } | ||
| ' tool/dart_skills_lint/CHANGELOG.md > release-notes.md | ||
| if [ ! -s release-notes.md ]; then | ||
| echo "ERROR: no CHANGELOG entry found for version '${VERSION}'" >&2 | ||
| echo "Expected a heading line: ## ${VERSION}" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "--- release notes ---" | ||
| cat release-notes.md | ||
| env: | ||
| VERSION: ${{ steps.meta.outputs.version }} | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: dart_skills_lint v${{ steps.meta.outputs.version }} | ||
| body_path: release-notes.md | ||
| prerelease: ${{ steps.meta.outputs.prerelease }} | ||
| files: | | ||
| dist/*.tar.gz | ||
| dist/SHA256SUMS | ||
| tool/dart_skills_lint/scripts/install.sh | ||
| fail_on_unmatched_files: true | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
For a v0.5:
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.
filed #165