Update README.md #10
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: Build ProxyScraper | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: [closed] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| repository-projects: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install 7zip | |
| run: choco install 7zip -y | |
| shell: cmd | |
| - name: Download MinGW | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest -Uri https://github.com/brechtsanders/winlibs_mingw/releases/download/15.1.0posix-13.0.0-msvcrt-r3/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64msvcrt-13.0.0-r3.7z -OutFile mingw.7z | |
| shell: powershell | |
| - name: Extract MinGW | |
| run: 7z x mingw.7z -oC:\mingw -y > nul | |
| shell: cmd | |
| - name: Set up environment | |
| run: | | |
| echo "C:\mingw\bin" >> $env:GITHUB_PATH | |
| shell: powershell | |
| - name: Verify GCC | |
| run: | | |
| gcc --version | |
| shell: cmd | |
| - name: Compile resource file | |
| run: windres assets\ProxyScraper.rc -O coff -o assets\ProxyScraper.o | |
| shell: cmd | |
| - name: Build project | |
| run: g++ ProxyScraper.cpp assets\ProxyScraper.o -w -O2 -static -lpsapi -lwinhttp -lws2_32 -fexceptions -Wl,--gc-sections -pipe -s -o ProxyScraper.exe | |
| shell: cmd | |
| - name: List build directory | |
| shell: cmd | |
| run: dir | |
| - name: Delete existing tag and release | |
| uses: dev-drprasad/delete-tag-and-release@v1.1 | |
| with: | |
| tag_name: ProxyScraper | |
| delete_release: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ProxyScraper | |
| release_name: ProxyScraper | |
| body: "Release created by GitHub Actions" | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ProxyScraper.exe | |
| asset_name: ProxyScraper.exe | |
| asset_content_type: application/octet-stream |