去除 TCP 内容的加解密 #12
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: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
- name: Cross building | |
run: | | |
oslist="linux darwin windows" | |
# Support all archs | |
archlist="amd64 arm64" | |
for os in $oslist; do | |
for arch in $archlist; do | |
CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -o .build/http2tcp-$os-$arch | |
done | |
done | |
- name: Generate body | |
run: | | |
echo '**Build At**: | |
* `'"$(TZ=Asia/Shanghai date)"'` | |
**sha256sum**: | |
```- | |
'"$(cd .build && sha256sum *)"' | |
``` | |
' > body.md | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ github.sha }} | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
replacesArtifacts: true | |
artifacts: .build/* | |
commit: ${{ github.sha }} | |
tag: release-latest | |
bodyFile: body.md |