| 1 | name: Build for Windows |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - '**' |
| 7 | paths-ignore: |
| 8 | - 'README.md' |
| 9 | - 'LICENSE.txt' |
| 10 | - 'RELNOTES' |
| 11 | - 'TODO' |
| 12 | pull_request: |
| 13 | release: |
| 14 | types: [published] |
| 15 | |
| 16 | jobs: |
| 17 | build: |
| 18 | runs-on: windows-latest |
| 19 | steps: |
| 20 | - uses: actions/checkout@v4 |
| 21 | - uses: msys2/setup-msys2@v2 |
| 22 | with: |
| 23 | msystem: msys |
| 24 | install: >- |
| 25 | mingw-w64-x86_64-toolchain |
| 26 | gcc |
| 27 | make |
| 28 | openssl |
| 29 | openssl-devel |
| 30 | zip |
| 31 | unzip |
| 32 | xmlto |
| 33 | asciidoc |
| 34 | curl |
| 35 | awk |
| 36 | bash |
| 37 | - name: Build |
| 38 | shell: msys2 {0} |
| 39 | run: | |
| 40 | make |
| 41 | make docs |
| 42 | ldd proxytunnel.exe | grep msys.*\.dll | awk '{print $3}' | xargs cp -t . |
| 43 | zip proxytunnel.zip proxytunnel.exe *.dll docs/proxytunnel.1 docs/*.html |
| 44 | - name: Upload CI Artifact |
| 45 | uses: actions/upload-artifact@v4 |
| 46 | with: |
| 47 | name: proxytunnel-${{ github.sha }}-x86_64-windows-msys |
| 48 | path: proxytunnel.zip |
| 49 | - name: Upload to GitHub Release |
| 50 | uses: svenstaro/upload-release-action@v2 |
| 51 | if: github.event_name == 'release' |
| 52 | with: |
| 53 | file: proxytunnel.zip |
| 54 | asset_name: proxytunnel-${{ github.ref_name }}-x86_64-windows-msys.zip |
| 55 | tag: ${{ github.ref }} |
| 56 | overwrite: true |