Files
httprunner/.github/workflows/release.yml
2022-01-20 18:15:53 +08:00

39 lines
1.2 KiB
YAML

name: Release hrp cli binaries
on:
release:
types: [created]
jobs:
releases-matrix:
name: Release hrp cli binaries
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/amd64/windows
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Release hrp cli binaries
uses: wangyoucao577/go-release-action@v1.22
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./cli/hrp" # go build ./cli/hrp/main.go
binary_name: "hrp"
ldflags: "-s -w"
extra_files: LICENSE README.md docs/CHANGELOG.md
- name: Upload to aliyun OSS
uses: manyuanrong/setup-ossutil@v2.0
with:
endpoint: "oss-cn-beijing.aliyuncs.com"
access-key-id: ${{ secrets.ALIYUN_ACCESSKEY_ID }}
access-key-secret: ${{ secrets.ALIYUN_ACCESSKEY_SECRET }}
- run: ossutil cp -rf cli/scripts/install.sh *.tar.gz *.zip oss://httprunner/