From ba0ac3d195fb7166e8ed5d39bcb6b468eb35591f Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Mon, 24 Jun 2024 23:23:20 +0200 Subject: [PATCH] chore: update release workflow and drop Raspberry Pi action --- .github/workflows/create-release.yaml | 22 +----- .github/workflows/package-raspberry-pi.yml | 86 ---------------------- .github/workflows/release.yaml | 6 +- 3 files changed, 7 insertions(+), 107 deletions(-) delete mode 100644 .github/workflows/package-raspberry-pi.yml diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 0238d0dd..5bd1bb16 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -10,29 +10,15 @@ jobs: release: runs-on: ubuntu-latest steps: - - name: Download Raspberry Pi archive + - name: Download Linux server archives uses: actions/download-artifact@v4 with: - name: nostr-wallet-connect-rpi.tar.bz2 - path: artifacts + pattern: albyhub-Server-Linux-* - - name: Download Linux desktop archive + - name: Download desktop archives uses: actions/download-artifact@v4 with: - name: albyhub-Linux - path: artifacts - - - name: Download macOS desktop archive - uses: actions/download-artifact@v4 - with: - name: albyhub-macOS - path: artifacts - - - name: Download Windows desktop archive - uses: actions/download-artifact@v4 - with: - name: albyhub-Windows - path: artifacts + pattern: albyhub-Desktop-* - name: Create release without tag if: github.ref_type != 'tag' diff --git a/.github/workflows/package-raspberry-pi.yml b/.github/workflows/package-raspberry-pi.yml deleted file mode 100644 index e844d8cc..00000000 --- a/.github/workflows/package-raspberry-pi.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Build package for Raspberry Pi - -on: - push: - - workflow_call: - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.21.x - - - name: Set up Node for the frontend - uses: actions/setup-node@v4 - with: - node-version: 20.x - - - name: Build the frontend - run: cd frontend && yarn install && yarn build:http && cd .. - - - name: Get dependencies - run: go get -v -t -d ./... - - - name: Install cross-compiler and utilities - run: | - sudo apt-get update - sudo apt-get install -y patchelf - wget -nv https://github.com/getAlby/gcc-arm-linux-gnueabihf/releases/download/v1.0.0/armv6-unknown-linux-gnueabihf.tar.bz2 - tar -xf armv6-unknown-linux-gnueabihf.tar.bz2 - - - name: Build - env: - GOOS: linux - GOARCH: arm - GOARM: 6 - CGO_ENABLED: 1 - CC: ${{ github.workspace }}/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-gcc - TAG: ${{ github.ref_name }} - run: go build -tags skip_breez,netgo -v -o nostr-wallet-connect -ldflags "-X 'github.com/getAlby/nostr-wallet-connect/version.Tag=${{ env.TAG }}'" cmd/http/main.go - - - name: Find and copy shared libraries - run: | - mkdir lib - find `go env GOMODCACHE` -name 'libglalby_bindings.so' | grep arm-unknown-linux-gnueabihf | xargs -I {} cp {} ./lib - find `go env GOMODCACHE` -name 'libldk_node.so' | grep arm-unknown-linux-gnueabihf | xargs -I {} cp {} ./lib - - - name: Strip and patch RPATH in the executable - run: | - ${{ github.workspace }}/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-strip ./nostr-wallet-connect - patchelf --force-rpath --set-rpath '$ORIGIN/lib' ./nostr-wallet-connect - - # TODO: remove this once install.sh and update.sh are updated (they currently use this artifact) - # it produces a ZIP archive that loses all permissions - - name: Archive the artifacts - uses: actions/upload-artifact@v4 - with: - name: nostr-wallet-connect.zip - path: | - lib/ - nostr-wallet-connect - - - name: Add Linux perms - run: chmod +x ./nostr-wallet-connect - - # Store everything in a tar archive to preserve permissions - # (specifically, the executable bit on the app executable). - - name: Make output tar archive - run: | - mkdir -p ./tmp - mv ./nostr-wallet-connect ./tmp/ - mv ./lib ./tmp/ - tar -cjf nostr-wallet-connect-rpi.tar.bz2 -C ./tmp . - rm -Rf ./tmp - - - name: Upload the package - uses: actions/upload-artifact@v4 - with: - name: nostr-wallet-connect-rpi.tar.bz2 - path: nostr-wallet-connect-rpi.tar.bz2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9a784bc7..c8e1f81d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,8 +4,8 @@ on: workflow_dispatch: jobs: - build-raspberry-pi: - uses: ./.github/workflows/package-raspberry-pi.yml + build-server: + uses: ./.github/workflows/http.yml build-wails: uses: ./.github/workflows/wails.yml @@ -18,7 +18,7 @@ jobs: release-draft: needs: - - build-raspberry-pi + - build-server - build-wails uses: ./.github/workflows/create-release.yaml secrets: