feature: add github proxy list (proxifly/free-proxy-list) #16
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: Build Multi-Platform Binaries | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| paths-ignore: | |
| - "**/*.md" | |
| - "*.md" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/*.md" | |
| - "*.md" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build for ${{ matrix.os }}-${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| if: "!contains(github.event.head_commit.message, '#skip-ci')" | |
| strategy: | |
| matrix: | |
| include: | |
| # Linux builds | |
| - os: linux | |
| arch: amd64 | |
| runner: ubuntu-latest | |
| binary_name: aproxy-linux-amd64 | |
| - os: linux | |
| arch: arm64 | |
| runner: ubuntu-latest | |
| binary_name: aproxy-linux-arm64 | |
| - os: linux | |
| arch: arm | |
| runner: ubuntu-latest | |
| binary_name: aproxy-linux-arm | |
| - os: linux | |
| arch: 386 | |
| runner: ubuntu-latest | |
| binary_name: aproxy-linux-386 | |
| # Windows builds | |
| - os: windows | |
| arch: amd64 | |
| runner: windows-latest | |
| binary_name: aproxy-windows-amd64.exe | |
| - os: windows | |
| arch: 386 | |
| runner: windows-latest | |
| binary_name: aproxy-windows-386.exe | |
| - os: windows | |
| arch: arm64 | |
| runner: windows-latest | |
| binary_name: aproxy-windows-arm64.exe | |
| # macOS builds | |
| - os: darwin | |
| arch: amd64 | |
| runner: macos-latest | |
| binary_name: aproxy-darwin-amd64 | |
| - os: darwin | |
| arch: arm64 | |
| runner: macos-latest | |
| binary_name: aproxy-darwin-arm64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.21" | |
| check-latest: true | |
| cache: false | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run tests | |
| run: go test ./... | |
| - name: Build binary | |
| env: | |
| GOOS: ${{ matrix.os }} | |
| GOARCH: ${{ matrix.arch }} | |
| CGO_ENABLED: 0 | |
| run: | | |
| go build -ldflags="-s -w" -o ${{ matrix.binary_name }} ./cmd/aproxy | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.binary_name }} | |
| path: ${{ matrix.binary_name }} | |
| retention-days: 30 | |
| - name: Upload to release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ matrix.binary_name }} | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |