release/0.8.4 #34
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: Release GoByPASS403 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-linux: | |
| name: Build Static Linux Binary | |
| runs-on: ubuntu-latest | |
| container: | |
| image: alpine:3.22 | |
| steps: | |
| - name: Install dependencies | |
| run: apk add --no-cache build-base git curl pkgconf sqlite-dev musl-dev | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.24.1 | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Configure Git Safe Directory | |
| run: git config --global --add safe.directory /__w/gobypass403/gobypass403 | |
| - name: Extract version from Git tag | |
| run: | | |
| VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| shell: sh | |
| - name: Build Static Linux Binary (CGO + musl) | |
| env: | |
| CGO_ENABLED: 1 | |
| GOOS: linux | |
| GOARCH: amd64 | |
| run: | | |
| mkdir -p dist | |
| go build -v -a -ldflags '-extldflags "-static"' \ | |
| -o dist/gobypass403_${VERSION}_linux-amd64 ./cmd/gobypass403 | |
| - name: Upload Linux Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/gobypass403_${{ env.VERSION }}_linux-amd64 | |
| draft: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-other: | |
| name: Build macOS & Windows | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| goos: darwin | |
| goarch: amd64 | |
| - os: windows-latest | |
| goos: windows | |
| goarch: amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Extract version from Git tag | |
| run: | | |
| VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.24.1 | |
| - name: Build macOS & Windows binaries | |
| shell: bash | |
| env: | |
| CGO_ENABLED: 1 | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| mkdir -p dist | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| EXT=".exe" | |
| fi | |
| OUTPUT_NAME="dist/gobypass403_${VERSION}_${{ matrix.goos }}-${{ matrix.goarch }}${EXT}" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| go build -v -a -ldflags '-extldflags "-static"' -o ${OUTPUT_NAME} ./cmd/gobypass403 | |
| else | |
| go build -v -o ${OUTPUT_NAME} ./cmd/gobypass403 | |
| fi | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/* | |
| draft: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |