Refactor DefaultReverseProxyHTTPHandler to allow customization (#1) #10
This file contains 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: CI | |
on: | |
push: | |
tags: ["*"] | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
jobs: | |
build-release: | |
name: Build and Release | |
runs-on: ubuntu-latest | |
permissions: | |
# Allow creating releases | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ~1.21.0 | |
- run: go get | |
- run: make build | |
env: | |
CGO_ENABLED: 0 | |
- name: Get short sha | |
id: short-sha | |
run: echo "value=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
# Upload some useful binaries for debug | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: fingerproxy_darwin_arm64_${{ steps.short-sha.outputs.value }} | |
path: bin/fingerproxy_darwin_arm64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: fingerproxy_linux_amd64_${{ steps.short-sha.outputs.value }} | |
path: bin/fingerproxy_linux_amd64 | |
- if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
TAG=$(git describe --tags --abbrev=0 HEAD) | |
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ || true) | |
[[ -n $LAST_TAG ]] && RANGE=$LAST_TAG..HEAD || RANGE=HEAD | |
RELEASE_NOTES=$(git log "$RANGE" --oneline --decorate) | |
gh release create --notes "$RELEASE_NOTES" "$TAG" bin/* |