ci: add windows exe build #27
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-docker: | |
| name: Build Docker | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build service | |
| run: docker build . | |
| build-windows: | |
| name: Build Windows executable | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Perl for Windows build | |
| uses: shogo82148/actions-setup-perl@v1 | |
| with: | |
| perl-version: "5.40" | |
| - name: Install Perl dependencies for Windows build | |
| run: | | |
| cpanm --notest PAR::Packer | |
| cpanm --notest Compress::Zlib | |
| cpanm --notest Encode | |
| cpanm --notest File::Basename | |
| cpanm --notest File::Copy | |
| cpanm --notest Getopt::Std | |
| cpanm --notest HTTP::Cookies | |
| cpanm --notest URI | |
| cpanm --notest URI::Escape | |
| cpanm --notest LWP::UserAgent | |
| cpanm --notest LWP::ConnCache | |
| cpanm --notest POSIX | |
| cpanm --notest Time::Local | |
| cpanm --notest Time::Piece | |
| cpanm --notest JSON | |
| cpanm --notest Sub::Util | |
| - name: Build Windows executable | |
| run: pp -o zap2xml.exe zap2xml.pl | |
| - name: Copy entrypoint.bat | |
| run: | | |
| mkdir dist | |
| copy .zap2xml-example dist\.zap2xml-example | |
| copy entrypoint.bat dist\entrypoint.bat | |
| copy zap2xml.exe dist\zap2xml.exe | |
| shell: cmd | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zap2xml-windows | |
| path: dist/ | |
| retention-days: 1 |