Split peyawallet into lite and mining variants
build / Build Linux (lite) (push) Successful in 2m19s
build / Build Linux (mining) (push) Successful in 2m48s
build / Build Windows (lite) (push) Successful in 21m58s
build / Build Windows (mining) (push) Has been cancelled

This commit is contained in:
Codex Bot
2026-04-20 22:42:52 +02:00
parent 32b38820d6
commit b4d32e5ea8
14 changed files with 1263 additions and 70 deletions
+63 -15
View File
@@ -1,5 +1,5 @@
name: release
run-name: release wallet ${{ inputs.tag_name }}
run-name: release wallet variants ${{ inputs.tag_name }}
on:
workflow_dispatch:
@@ -19,6 +19,10 @@ on:
description: monero_c release tag to bundle runtime from
required: false
default: latest
xmrig_release_tag:
description: xmrig release tag to bundle mining runtime from
required: false
default: latest
release_name:
description: Optional release title
required: false
@@ -121,12 +125,21 @@ jobs:
echo "release_id=$(jq -r '.id' /tmp/release.json)" >> "$GITHUB_OUTPUT"
build-linux:
name: Build Linux release
name: Build Linux release (${{ matrix.flavor }})
needs: create-release
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- flavor: lite
enable_mining: "false"
- flavor: mining
enable_mining: "true"
env:
PEYA_RELEASE_TAG: ${{ inputs.peya_release_tag }}
MONERO_C_RELEASE_TAG: ${{ inputs.monero_c_release_tag }}
XMRIG_RELEASE_TAG: ${{ inputs.xmrig_release_tag }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
@@ -178,26 +191,40 @@ jobs:
MONERO_C_GITEA_PAT: ${{ secrets.MONERO_C_GITEA_PAT }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
run: |
set -euo pipefail
EXTRA_ARGS=()
if [ "${{ matrix.flavor }}" = "mining" ]; then
EXTRA_ARGS+=(--xmrig-tag "${XMRIG_RELEASE_TAG:-latest}")
fi
python3 scripts/ci/stage_release_runtime.py \
--platform linux \
--peya-tag "${PEYA_RELEASE_TAG:-latest}" \
--monero-c-tag "${MONERO_C_RELEASE_TAG:-latest}" \
--repo-root .
--repo-root . \
"${EXTRA_ARGS[@]}"
- name: Fetch Dart/Flutter deps
run: |
flutter pub get
run: flutter pub get
- name: Build Linux release
run: |
flutter build linux --release
flutter build linux --release \
--dart-define=PEYA_ENABLE_MINING=${{ matrix.enable_mining }} \
--dart-define=PEYA_RELEASE_FLAVOR=${{ matrix.flavor }}
- name: Bundle xmrig
if: ${{ matrix.flavor == 'mining' }}
run: |
set -euo pipefail
install -Dm755 external/miner/xmrig \
build/linux/x64/release/bundle/external/miner/xmrig
- name: Package Linux release
env:
TAG_NAME: ${{ inputs.tag_name }}
run: |
set -euo pipefail
archive="/tmp/peyawallet-${TAG_NAME}-linux-x86_64.tar.gz"
archive="/tmp/peyawallet-${{ matrix.flavor }}-${TAG_NAME}-linux-x86_64.tar.gz"
tar -C build/linux/x64/release/bundle -czf "${archive}" .
echo "ARCHIVE_PATH=${archive}" >> "$GITHUB_ENV"
echo "ARCHIVE_NAME=$(basename "${archive}")" >> "$GITHUB_ENV"
@@ -244,12 +271,21 @@ jobs:
>/dev/null
build-windows:
name: Build Windows release
name: Build Windows release (${{ matrix.flavor }})
needs: create-release
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- flavor: lite
enable_mining: "false"
- flavor: mining
enable_mining: "true"
env:
PEYA_RELEASE_TAG: ${{ inputs.peya_release_tag }}
MONERO_C_RELEASE_TAG: ${{ inputs.monero_c_release_tag }}
XMRIG_RELEASE_TAG: ${{ inputs.xmrig_release_tag }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
@@ -282,26 +318,38 @@ jobs:
GITEA_PAT: ${{ secrets.GITEA_PAT }}
run: |
set -euo pipefail
EXTRA_ARGS=()
if [ "${{ matrix.flavor }}" = "mining" ]; then
EXTRA_ARGS+=(--xmrig-tag "${XMRIG_RELEASE_TAG:-latest}")
fi
python -u scripts/ci/stage_release_runtime.py \
--platform windows \
--peya-tag "${PEYA_RELEASE_TAG:-latest}" \
--monero-c-tag "${MONERO_C_RELEASE_TAG:-latest}" \
--repo-root .
--repo-root . \
"${EXTRA_ARGS[@]}"
- name: Show toolchain
shell: bash
run: |
flutter doctor -v
run: flutter doctor -v
- name: Fetch Dart/Flutter deps
shell: bash
run: |
flutter pub get
run: flutter pub get
- name: Build Windows release
shell: bash
run: |
flutter build windows --release
flutter build windows --release \
--dart-define=PEYA_ENABLE_MINING=${{ matrix.enable_mining }} \
--dart-define=PEYA_RELEASE_FLAVOR=${{ matrix.flavor }}
- name: Bundle xmrig
if: ${{ matrix.flavor == 'mining' }}
shell: cmd
run: |
if not exist build\windows\x64\runner\Release\external\miner mkdir build\windows\x64\runner\Release\external\miner
copy external\miner\xmrig.exe build\windows\x64\runner\Release\external\miner\xmrig.exe
- name: Package Windows release
shell: bash
@@ -309,7 +357,7 @@ jobs:
TAG_NAME: ${{ inputs.tag_name }}
run: |
set -euo pipefail
archive="C:/Windows/Temp/peyawallet-${TAG_NAME}-windows-x86_64.zip"
archive="C:/Windows/Temp/peyawallet-${{ matrix.flavor }}-${TAG_NAME}-windows-x86_64.zip"
powershell.exe -NoProfile -Command "if (Test-Path '${archive}') { Remove-Item '${archive}' -Force }; Compress-Archive -Path 'build/windows/x64/runner/Release/*' -DestinationPath '${archive}'"
echo "ARCHIVE_PATH=${archive}" >> "$GITHUB_ENV"
echo "ARCHIVE_NAME=$(basename "${archive}")" >> "$GITHUB_ENV"