diff --git a/.github/workflows/build-docker.yaml b/.github/workflows/build-docker.yaml index 54d39d4e..608d5581 100644 --- a/.github/workflows/build-docker.yaml +++ b/.github/workflows/build-docker.yaml @@ -8,6 +8,7 @@ jobs: env: REGISTRY: ghcr.io IMAGENAME: ${{ github.event.repository.name }} + TAG: ${{ github.ref_name }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -30,4 +31,4 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} addLatest: ${{ github.ref == 'refs/heads/master' }} - buildArgs: TAG=0.5 + buildArgs: TAG=${{ env.TAG }} diff --git a/.github/workflows/package-raspberry-pi.yml b/.github/workflows/package-raspberry-pi.yml index 8329ebc4..6939ca57 100644 --- a/.github/workflows/package-raspberry-pi.yml +++ b/.github/workflows/package-raspberry-pi.yml @@ -42,7 +42,8 @@ jobs: GOARM: 6 CGO_ENABLED: 1 CC: ${{ github.workspace }}/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-gcc - run: go build -tags skip_breez,netgo -v -o nostr-wallet-connect cmd/http/main.go + TAG: ${{ github.ref_name }} + run: go build -tags skip_breez,netgo -v -o nostr-wallet-connect cmd/http/main.go -ldflags "-X 'github.com/getAlby/nostr-wallet-connect/version.Tag=${{ env.TAG }}'" - name: Find and copy shared libraries run: | diff --git a/.github/workflows/wails.yml b/.github/workflows/wails.yml index 2ecb786f..fde690ea 100644 --- a/.github/workflows/wails.yml +++ b/.github/workflows/wails.yml @@ -28,6 +28,8 @@ jobs: { name: albyhub, platform: darwin/universal, os: macos-12 }, ] runs-on: ${{ matrix.build.os }} + env: + TAG: ${{ github.ref_name }} steps: - uses: actions/checkout@v4 with: @@ -100,17 +102,17 @@ jobs: - name: Build App if: runner.os == 'macOS' - run: wails build --platform darwin/universal -webview2 embed -o ${{ matrix.build.name }} -tags "wails" + run: wails build --platform darwin/universal -webview2 embed -o ${{ matrix.build.name }} -tags "wails" -ldflags "-X 'github.com/getAlby/nostr-wallet-connect/version.Tag=${{ env.TAG }}'" shell: bash - name: Build App if: runner.os == 'Linux' - run: wails build --platform linux/amd64 -webview2 embed -o ${{ matrix.build.name }} -tags "wails" + run: wails build --platform linux/amd64 -webview2 embed -o ${{ matrix.build.name }} -tags "wails" -ldflags "-X 'github.com/getAlby/nostr-wallet-connect/version.Tag=${{ env.TAG }}'" shell: bash - name: Build Windows App if: runner.os == 'Windows' - run: wails build --platform windows/amd64 -webview2 embed -o ${{ matrix.build.name }}.exe -tags "wails" + run: wails build --platform windows/amd64 -webview2 embed -o ${{ matrix.build.name }}.exe -tags "wails" -ldflags "-X 'github.com/getAlby/nostr-wallet-connect/version.Tag=${{ env.TAG }}'" shell: bash - name: Import Code-Signing Certificates for macOS