diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..987b7e4 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,26 @@ +# On-demand GitHub Pages deploy: publishes docs/ (the landing page) as-is. Trigger from the Actions +# tab or `gh workflow run pages.yml` after merging a docs/ change you want live; nothing runs on push. +name: Deploy Pages +on: + workflow_dispatch: {} +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: pages + cancel-in-progress: false +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v7 + - uses: actions/configure-pages@v5 + - uses: actions/upload-pages-artifact@v3 + with: + path: docs + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4491d05 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,85 @@ +# On-demand release: build the `hinge` binary for Linux/macOS/Windows and publish them on a GitHub +# Release tagged from Cargo.toml's version (the single version source; see CONTRIBUTING.md). Nothing +# runs automatically — trigger it from the Actions tab (or `gh workflow run release.yml`) once a PR +# with the version bump you want to ship is on `main`. +name: Release +on: + workflow_dispatch: {} +permissions: + contents: write +jobs: + version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.v.outputs.version }} + tag: ${{ steps.v.outputs.tag }} + steps: + - uses: actions/checkout@v7 + - id: v + run: | + v="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" + echo "version=$v" >> "$GITHUB_OUTPUT" + echo "tag=v$v" >> "$GITHUB_OUTPUT" + - name: fail if this version was already released + run: | + if gh release view "v${{ steps.v.outputs.version }}" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then + echo "::error::v${{ steps.v.outputs.version }} already has a release. Bump Cargo.toml's version first." >&2 + exit 1 + fi + env: + GH_TOKEN: ${{ github.token }} + + build: + needs: version + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + archive: tar.gz + - os: macos-latest + target: x86_64-apple-darwin + archive: tar.gz + - os: macos-latest + target: aarch64-apple-darwin + archive: tar.gz + - os: windows-latest + target: x86_64-pc-windows-msvc + archive: zip + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - run: rustup target add ${{ matrix.target }} + - run: cargo build --release --locked --target ${{ matrix.target }} + - name: package (unix) + if: matrix.archive == 'tar.gz' + run: | + cd target/${{ matrix.target }}/release + tar czf "$GITHUB_WORKSPACE/hinge-${{ needs.version.outputs.tag }}-${{ matrix.target }}.tar.gz" hinge + - name: package (windows) + if: matrix.archive == 'zip' + shell: pwsh + run: Compress-Archive -Path "target/${{ matrix.target }}/release/hinge.exe" -DestinationPath "hinge-${{ needs.version.outputs.tag }}-${{ matrix.target }}.zip" + - uses: actions/upload-artifact@v4 + with: + name: hinge-${{ matrix.target }} + path: hinge-*.${{ matrix.archive }} + if-no-files-found: error + + release: + needs: [version, build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/download-artifact@v5 + with: + path: dist + merge-multiple: true + - name: extract this version's changelog section + run: | + awk '/^## \['"${{ needs.version.outputs.version }}"'\]/{f=1;next} /^## \[/{f=0} f' CHANGELOG.md > release-notes.md + [ -s release-notes.md ] || echo "See CHANGELOG.md." > release-notes.md + - run: gh release create "${{ needs.version.outputs.tag }}" dist/*.tar.gz dist/*.zip --title "${{ needs.version.outputs.tag }}" --notes-file release-notes.md --repo "$GITHUB_REPOSITORY" + env: + GH_TOKEN: ${{ github.token }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 66d828f..6fa27f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ rather than editing several version sources by hand. Format: [Keep a Changelog]( ## [Unreleased] +## [0.2.2] - 2026-11-28 +### Added +- `.github/workflows/release.yml`: on-demand (manual-dispatch only) GitHub Release, building `hinge` + for Linux, macOS (x86_64 + arm64) and Windows and tagging `v`. +- `.github/workflows/pages.yml`: on-demand (manual-dispatch only) GitHub Pages deploy of `docs/`. +- GitHub Pages enabled (Actions build) at https://ifthenelse.github.io/hinge-cli/; linked from the + README and set as the repository homepage. Repository topics added. +### Changed +- Branch protection on `main` now requires all four CI checks (`verify`, `codeql`, `secret-scan`, + `dependency-audit`), not just `verify`. + ## [0.2.1] - 2026-11-28 ### Added - `hinge auth capture`: runs the session-capture steps for you (starts the local proxy, prints what diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47670a0..08d3258 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,6 +36,15 @@ fake `$HOME`, so it never touches a real session or calls the live Hinge API). updated, docs/ADR updated) plus a 24h cooling-off before merging anything touching `src/secrets.rs`, `src/session_store.rs`, `src/api.rs`, or `.github/workflows/`. +## Releases +Two on-demand GitHub Actions workflows, both triggered manually (Actions tab or `gh workflow run +`) — nothing runs on every push: +- **`release.yml`** — builds `hinge` for Linux, macOS (x86_64 + arm64) and Windows, tags + `v`, and publishes a GitHub Release with the binaries and that version's + `CHANGELOG.md` section as the notes. Bump `Cargo.toml`'s version first; it refuses to re-release an + existing tag. +- **`pages.yml`** — publishes `docs/index.html` (the GitHub Pages site) as-is. + ## Escalation Security concerns: see [SECURITY.md](SECURITY.md). Blocked reviews or anything else: open a GitHub issue — there is no other channel for this single-maintainer project. diff --git a/Cargo.lock b/Cargo.lock index 053c768..0046bff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -360,7 +360,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hinge-cli" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 102fe6e..8a38f43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hinge-cli" -version = "0.2.1" +version = "0.2.2" edition = "2024" description = "Command-line client for your own Hinge account, built on its reverse-engineered HTTP API." license = "MIT" diff --git a/README.md b/README.md index 3f096b8..8c4d7c1 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ automating a swipe. [![CI](https://github.com/ifthenelse/hinge-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/ifthenelse/hinge-cli/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/github/license/ifthenelse/hinge-cli)](LICENSE) +[![Release](https://img.shields.io/github/v/release/ifthenelse/hinge-cli?sort=semver)](https://github.com/ifthenelse/hinge-cli/releases) It talks directly to Hinge's real HTTP API (reverse-engineered from captured app traffic, not UI automation at runtime) using a session you capture from your own phone, and reports things the app @@ -101,3 +102,5 @@ in the name only to say which service the tool works with. ## License [MIT](LICENSE) + +[ifthenelse.github.io/hinge-cli](https://ifthenelse.github.io/hinge-cli/) — the project's GitHub Pages site.