|
20 | 20 | output: portscanner |
21 | 21 | asset: GoMap-linux-amd64 |
22 | 22 |
|
23 | | - - runner: ubuntu-latest |
24 | | - platform: linux/arm64 |
25 | | - output: portscanner |
26 | | - asset: GoMap-linux-arm64 |
27 | | - cross_cc: aarch64-linux-gnu-gcc |
28 | | - cross_pkg: gcc-aarch64-linux-gnu |
29 | | - |
30 | 23 | - runner: windows-latest |
31 | 24 | platform: windows/amd64 |
32 | 25 | output: portscanner.exe |
|
56 | 49 | sudo apt-get update |
57 | 50 | sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev |
58 | 51 |
|
59 | | - - name: Install arm64 cross-compiler |
60 | | - if: matrix.cross_pkg != '' |
61 | | - run: sudo apt-get install -y ${{ matrix.cross_pkg }} |
62 | 52 |
|
63 | 53 | # ── Build ──────────────────────────────────────────────────────────────── |
64 | | - - name: Build (arm64 cross-compile) |
65 | | - if: matrix.cross_cc != '' |
66 | | - env: |
67 | | - CC: ${{ matrix.cross_cc }} |
68 | | - CGO_ENABLED: '1' |
69 | | - run: wails build -platform ${{ matrix.platform }} -tags webkit2_41 |
70 | | - |
71 | 54 | - name: Build |
72 | | - if: matrix.cross_cc == '' |
73 | 55 | run: wails build -platform ${{ matrix.platform }} -tags webkit2_41 |
74 | 56 |
|
75 | 57 | # ── Rename to final asset name ─────────────────────────────────────────── |
|
82 | 64 | shell: pwsh |
83 | 65 | run: Copy-Item build/bin/${{ matrix.output }} build/bin/${{ matrix.asset }} |
84 | 66 |
|
85 | | - # ── Upload to GitHub Release (tags only) ───────────────────────────────── |
86 | | - - name: Upload release asset |
| 67 | + # ── Upload to GitHub Release ───────────────────────────────────────────── |
| 68 | + - name: Upload to "latest" pre-release (main branch) |
| 69 | + if: github.ref == 'refs/heads/main' |
| 70 | + uses: softprops/action-gh-release@v2 |
| 71 | + with: |
| 72 | + tag_name: latest |
| 73 | + name: Latest Build |
| 74 | + prerelease: true |
| 75 | + files: build/bin/${{ matrix.asset }} |
| 76 | + env: |
| 77 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 78 | + |
| 79 | + - name: Upload to versioned release (tag) |
87 | 80 | if: startsWith(github.ref, 'refs/tags/v') |
88 | 81 | uses: softprops/action-gh-release@v2 |
89 | 82 | with: |
|
0 commit comments