feat: optional Bitcoin node + BTC wallet (bitcoind + BDK sidecar) #88
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
| name: Build and Package | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: app | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: app/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck (astro sync + tsc --noEmit) | |
| run: npm run typecheck | |
| env: | |
| SESSION_SECRET: 'ci-test-secret-that-is-at-least-32-chars-long' | |
| WALLET_RPC_URL: 'http://127.0.0.1:19999' | |
| - name: Run unit tests with coverage | |
| run: npm run test:coverage | |
| env: | |
| SESSION_SECRET: 'ci-test-secret-that-is-at-least-32-chars-long' | |
| WALLET_RPC_URL: 'http://127.0.0.1:19999' | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: app/coverage/ | |
| retention-days: 14 | |
| build: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # needed to create GitHub Releases | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Verify tag matches package.json version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| PKG=$(node -p "require('./app/package.json').version") | |
| if [[ "$TAG" != "$PKG" ]]; then | |
| echo "Tag v${TAG} does not match app/package.json version ${PKG}" | |
| exit 1 | |
| fi | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| # Tags: | |
| # v1.2.3 tag → mintlayer/web-gui:1.2.3, mintlayer/web-gui:1.2, mintlayer/web-gui:latest | |
| # any tag → mintlayer/web-gui:sha-<short-sha> | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: mintlayer/web-gui | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest | |
| type=sha,prefix=sha-,format=short | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./app | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Package deploy files | |
| run: | | |
| mkdir mintlayer-gui | |
| cp deploy/linux.sh mintlayer-gui/ | |
| cp deploy/mac.sh mintlayer-gui/ | |
| cp deploy/docker-compose.yml mintlayer-gui/ | |
| chmod +x mintlayer-gui/linux.sh mintlayer-gui/mac.sh | |
| tar czf mintlayer-gui.tar.gz mintlayer-gui/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mintlayer-gui | |
| path: mintlayer-gui.tar.gz | |
| retention-days: 90 | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: mintlayer-gui.tar.gz | |
| generate_release_notes: true | |
| deploy-pages: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Prepare Pages content | |
| run: | | |
| mkdir _site | |
| cp deploy/index.html _site/ | |
| cp deploy/CNAME _site/ | |
| # Installers + agent prompt | |
| cp deploy/linux.sh _site/linux.sh | |
| cp deploy/mac.sh _site/mac.sh | |
| cp deploy/windows.ps1 _site/windows.ps1 | |
| cp deploy/agent-prompt.txt _site/agent-prompt.txt | |
| chmod +x _site/linux.sh _site/mac.sh _site/windows.ps1 | |
| # Favicons (same files as www.mintlayer.org) | |
| cp deploy/favicon.ico _site/favicon.ico | |
| cp deploy/favicon.svg _site/favicon.svg | |
| cp deploy/apple-touch-icon.svg _site/apple-touch-icon.svg | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@v4 |