v0.5.4: add Drive Standby + Agent OS sensors, rename Scan Interval to… #34
Workflow file for this run
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
| # Build and publish SMART Sniffer Agent binaries on tagged releases. | |
| # | |
| # Trigger: push a tag like v0.1.0 | |
| # git tag v0.1.0 | |
| # git push origin v0.1.0 | |
| # | |
| # The workflow: | |
| # 1. Checks out the code | |
| # 2. Cross-compiles for all supported platforms | |
| # 3. Generates SHA256 checksums | |
| # 4. Creates a GitHub Release with all artifacts attached | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: agent/go.mod | |
| cache-dependency-path: agent/go.sum | |
| - name: Vet Go | |
| working-directory: agent | |
| run: go vet ./... | |
| - name: Lint Python | |
| run: | | |
| pip install ruff | |
| ruff check custom_components/ | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Build all platforms | |
| working-directory: agent | |
| run: make all VERSION=${{ steps.version.outputs.VERSION }} | |
| - name: Generate checksums | |
| working-directory: agent/build | |
| run: | | |
| sha256sum smartha-agent-* > checksums.txt | |
| cat checksums.txt | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| # Extract the section for the current version from CHANGELOG.md. | |
| # Grabs everything between the first "## v*" heading and the next one. | |
| NOTES=$(awk ' | |
| /^## v/ { if (found) exit; found=1; next } | |
| found { print } | |
| ' CHANGELOG.md) | |
| # Write to a step output using a heredoc delimiter to preserve newlines. | |
| { | |
| echo "NOTES<<CHANGELOG_EOF" | |
| echo "$NOTES" | |
| echo "CHANGELOG_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: SMART Sniffer v${{ steps.version.outputs.VERSION }} | |
| # Auto-flag any tag with -rc, -beta, or -alpha as a pre-release | |
| # so GitHub's "latest release" endpoint skips it. install.sh and | |
| # install.ps1 both call that endpoint for version discovery; if | |
| # an rc were marked latest, every user running the install one- | |
| # liner without pinning VERSION would be pulled onto an rc. | |
| prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }} | |
| body: | | |
| ${{ steps.changelog.outputs.NOTES }} | |
| 📋 [Full Changelog](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) | |
| --- | |
| ### ⚡ Update Your Agents | |
| **Already have agents running?** Update them to match this release: | |
| ```bash | |
| curl -sSL https://raw.githubusercontent.com/${{ github.repository }}/main/install.sh | sudo bash | |
| ``` | |
| The installer detects your existing configuration and offers to keep it — just press Enter to upgrade in place. | |
| --- | |
| ### Fresh Install | |
| **Linux / macOS (one command):** | |
| ```bash | |
| curl -sSL https://raw.githubusercontent.com/${{ github.repository }}/main/install.sh | sudo bash | |
| ``` | |
| **Windows (PowerShell as Admin):** | |
| ```powershell | |
| irm https://raw.githubusercontent.com/${{ github.repository }}/main/install.ps1 | iex | |
| ``` | |
| ### Manual Download | |
| Download the binary for your platform below, then see the [README](https://github.com/${{ github.repository }}#installation) for manual installation instructions. | |
| ### Checksums | |
| Verify your download with `sha256sum -c checksums.txt`. | |
| files: | | |
| agent/build/smartha-agent-linux-amd64 | |
| agent/build/smartha-agent-linux-arm64 | |
| agent/build/smartha-agent-linux-arm | |
| agent/build/smartha-agent-darwin-amd64 | |
| agent/build/smartha-agent-darwin-arm64 | |
| agent/build/smartha-agent-windows-amd64.exe | |
| agent/build/checksums.txt | |
| generate_release_notes: true |