55 tags :
66 - " v[0-9]+.[0-9]+.[0-9]+"
77 - " v[0-9]+.[0-9]+.[0-9]+-rc*"
8+ # Manual trigger for testing - can be removed after verification
9+ workflow_dispatch :
10+ inputs :
11+ test_version :
12+ description : ' Test version string (e.g., 0.0.0-test)'
13+ required : false
14+ default : ' 0.0.0-test'
815
916permissions :
1017 contents : write
1118
1219jobs :
1320 build-linux :
21+ # Native runners for both architectures - eliminates QEMU emulation overhead
22+ # See: docs/research/release-build-infrastructure.md
1423 name : Build Linux ${{ matrix.arch }}
15- runs-on : ubuntu-22.04
24+ runs-on : ${{ matrix.runner }}
1625 strategy :
1726 matrix :
18- arch : [amd64, arm64]
27+ include :
28+ - arch : amd64
29+ runner : ubuntu-22.04
30+ - arch : arm64
31+ runner : ubuntu-24.04-arm # Native arm64 runner (free for public repos)
1932 steps :
2033 - name : Checkout
2134 uses : actions/checkout@v4
2437
2538 - name : Set version
2639 run : |
27- echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
40+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
41+ echo "VERSION=${{ github.event.inputs.test_version }}" >> $GITHUB_ENV
42+ else
43+ echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
44+ fi
2845
2946 - name : Setup Go
3047 uses : actions/setup-go@v5
4562 sha256sum bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz > bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz.sha256
4663
4764 - name : Upload to release
65+ if : github.event_name != 'workflow_dispatch'
4866 uses : softprops/action-gh-release@v2
4967 with :
5068 files : |
7391
7492 - name : Set version
7593 run : |
76- echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
94+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
95+ echo "VERSION=${{ github.event.inputs.test_version }}" >> $GITHUB_ENV
96+ else
97+ echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
98+ fi
7799
78100 - name : Setup Go
79101 uses : actions/setup-go@v5
@@ -92,48 +114,52 @@ jobs:
92114 shasum -a 256 bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz > bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz.sha256
93115
94116 - name : Upload to release
117+ if : github.event_name != 'workflow_dispatch'
95118 uses : softprops/action-gh-release@v2
96119 with :
97120 files : |
98121 build/bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz
99122 build/bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz.sha256
100123
101- build-windows :
102- name : Build Windows amd64
103- runs-on : windows-latest
104- steps :
105- - name : Install make
106- run : choco install make
107-
108- - name : Checkout
109- uses : actions/checkout@v4
110- with :
111- fetch-depth : 0
112-
113- - name : Set version
114- run : |
115- $version = git describe --tags | ForEach-Object { $_ -replace '^v', '' }
116- echo "VERSION=$version" >> $env:GITHUB_ENV
117-
118- - name : Setup Go
119- uses : actions/setup-go@v5
120- with :
121- go-version : " 1.23"
122-
123- - name : Build binary
124- run : |
125- make LEDGER_ENABLED=true build
126- mv build/bitsongd.exe "build/bitsongd-$env:VERSION-windows-amd64.exe"
127-
128- - name : Create checksum
129- run : |
130- cd build
131- $hash = (Get-FileHash -Algorithm SHA256 "bitsongd-$env:VERSION-windows-amd64.exe").Hash.ToLower()
132- "$hash bitsongd-$env:VERSION-windows-amd64.exe" | Out-File -Encoding ASCII "bitsongd-$env:VERSION-windows-amd64.exe.sha256"
133-
134- - name : Upload to release
135- uses : softprops/action-gh-release@v2
136- with :
137- files : |
138- build/bitsongd-${{ env.VERSION }}-windows-amd64.exe
139- build/bitsongd-${{ env.VERSION }}-windows-amd64.exe.sha256
124+ # NOTE: Windows builds disabled - Unix-specific syscalls (unix.LOCK_NB, unix.Flock)
125+ # cause build failures. Validators run Linux (99%+), CosmWasm requires Linux/macOS.
126+ # See: docs/research/release-build-infrastructure.md (Section 3)
127+ # build-windows:
128+ # name: Build Windows amd64
129+ # runs-on: windows-latest
130+ # steps:
131+ # - name: Install make
132+ # run: choco install make
133+ #
134+ # - name: Checkout
135+ # uses: actions/checkout@v4
136+ # with:
137+ # fetch-depth: 0
138+ #
139+ # - name: Set version
140+ # run: |
141+ # $version = git describe --tags | ForEach-Object { $_ -replace '^v', '' }
142+ # echo "VERSION=$version" >> $env:GITHUB_ENV
143+ #
144+ # - name: Setup Go
145+ # uses: actions/setup-go@v5
146+ # with:
147+ # go-version: "1.23"
148+ #
149+ # - name: Build binary
150+ # run: |
151+ # make LEDGER_ENABLED=true build
152+ # mv build/bitsongd.exe "build/bitsongd-$env:VERSION-windows-amd64.exe"
153+ #
154+ # - name: Create checksum
155+ # run: |
156+ # cd build
157+ # $hash = (Get-FileHash -Algorithm SHA256 "bitsongd-$env:VERSION-windows-amd64.exe").Hash.ToLower()
158+ # "$hash bitsongd-$env:VERSION-windows-amd64.exe" | Out-File -Encoding ASCII "bitsongd-$env:VERSION-windows-amd64.exe.sha256"
159+ #
160+ # - name: Upload to release
161+ # uses: softprops/action-gh-release@v2
162+ # with:
163+ # files: |
164+ # build/bitsongd-${{ env.VERSION }}-windows-amd64.exe
165+ # build/bitsongd-${{ env.VERSION }}-windows-amd64.exe.sha256
0 commit comments