diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..706afa4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,69 @@ +name: Multi-Platform Nix Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-24.04 + arch: x86_64-linux + - os: ubuntu-24.04-arm + arch: aarch64-linux + - os: macos-14 + arch: aarch64-darwin + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v27 + with: + extra_nix_config: | + experimental-features = nix-command flakes + + - uses: cachix/cachix-action@v15 + with: + name: logos-co + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Build portable module + run: nix build '.#lgx-portable' --out-link result-lgx-portable + + - name: Extract LGX bundle + run: cp result-lgx-portable/*.lgx ./logos-blockhain-ui-${{ matrix.arch }}.lgx + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: logos-blokchain-ui-${{ matrix.arch }} + path: '*.lgx' + if-no-files-found: error + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: release-binaries + pattern: logos-module-* + merge-multiple: true + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: release-binaries/*.lgx + generate_release_notes: false + draft: true + tag_name: ${{ github.ref_name }} +