mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-14 18:58:54 +00:00
f714e4498a
Wire GRIM's receiver-initiated invoice (Invoice1) over nostr so the Pay-tab "Request" button actually asks someone for money: pick a contact, issue an Invoice1, DM it; they get the existing approve-to-pay card. New WalletTask::NostrRequest mirrors NostrSend (issue_invoice + RequestedByUs / AwaitingI2, reusing send_payment_dm); the send flow gains a request mode (Request from -> Confirm request -> Send request -> Requested) with no balance guard, since requesting isn't spending. Incoming requests are now opt-out (Settings -> Requests, on by default): when off, an incoming Invoice1 is dropped and the preference is advertised in the kind-0 profile (goblin_accepts_requests) so a requester sees "Could not request" before sending. Adds a Cash App-style toggle switch widget. Also enlarge the center Pay puck in the floating nav, and make the macOS release build recur: release.yml now triggers on release publish (macOS only, since Linux/Windows/Android/AppImage are built locally).
103 lines
3.9 KiB
YAML
103 lines
3.9 KiB
YAML
# Release builds on native runners — one per platform, no cross-compilation
|
|
# (nokhwa's camera backends want each platform's own SDK; see NEXT-STEPS judgment).
|
|
#
|
|
# Manually triggered (Actions → Release → Run workflow) against an existing tag
|
|
# until a run has been validated end-to-end; then this can move to a tag trigger.
|
|
# Android is built locally via scripts/android.sh for now — the gradle `ci`
|
|
# flavor expects maven credentials this repository does not carry.
|
|
name: Release
|
|
|
|
on:
|
|
# Auto-build on every published release so macOS — which can't be built on the
|
|
# Linux release box — is produced for each build without manual steps. The
|
|
# Linux/Windows jobs are gated to manual dispatch only (those are built locally
|
|
# and uploaded with the release), so a publish event builds just macOS.
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Existing release tag to build and upload artifacts to (e.g. build27)"
|
|
required: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
TAG: ${{ inputs.tag || github.event.release.tag_name }}
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux x86_64
|
|
runs-on: ubuntu-latest
|
|
# Built locally and uploaded with the release; only run on manual dispatch.
|
|
if: github.event_name == 'workflow_dispatch'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ inputs.tag || github.event.release.tag_name }}
|
|
submodules: recursive
|
|
- name: Build
|
|
run: cargo build --release
|
|
- name: Package
|
|
run: |
|
|
tar -C target/release -czf "goblin-$TAG-linux-x86_64.tar.gz" goblin
|
|
sha256sum "goblin-$TAG-linux-x86_64.tar.gz" > "goblin-$TAG-linux-x86_64-sha256sum.txt"
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
|
|
files: |
|
|
goblin-${{ inputs.tag }}-linux-x86_64.tar.gz
|
|
goblin-${{ inputs.tag }}-linux-x86_64-sha256sum.txt
|
|
|
|
windows:
|
|
name: Windows x86_64 (MSVC)
|
|
runs-on: windows-latest
|
|
# Built locally and uploaded with the release; only run on manual dispatch.
|
|
if: github.event_name == 'workflow_dispatch'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ inputs.tag || github.event.release.tag_name }}
|
|
submodules: recursive
|
|
- name: Build
|
|
run: cargo build --release
|
|
- name: Package
|
|
shell: bash
|
|
run: |
|
|
7z a "goblin-$TAG-win-x86_64.zip" ./target/release/goblin.exe
|
|
sha256sum "goblin-$TAG-win-x86_64.zip" > "goblin-$TAG-win-x86_64-sha256sum.txt"
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
|
|
files: |
|
|
goblin-${{ inputs.tag }}-win-x86_64.zip
|
|
goblin-${{ inputs.tag }}-win-x86_64-sha256sum.txt
|
|
|
|
macos:
|
|
name: macOS universal
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ inputs.tag || github.event.release.tag_name }}
|
|
submodules: recursive
|
|
- name: Build both architectures
|
|
run: |
|
|
rustup target add aarch64-apple-darwin x86_64-apple-darwin
|
|
cargo build --release --target aarch64-apple-darwin
|
|
cargo build --release --target x86_64-apple-darwin
|
|
- name: Universal binary + package
|
|
run: |
|
|
lipo -create -output goblin \
|
|
target/aarch64-apple-darwin/release/goblin \
|
|
target/x86_64-apple-darwin/release/goblin
|
|
zip "goblin-$TAG-macos-universal.zip" goblin
|
|
shasum -a 256 "goblin-$TAG-macos-universal.zip" > "goblin-$TAG-macos-universal-sha256sum.txt"
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
|
|
files: |
|
|
goblin-${{ inputs.tag }}-macos-universal.zip
|
|
goblin-${{ inputs.tag }}-macos-universal-sha256sum.txt
|