mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 22:39:42 +08:00
refactor: move files to hrp
This commit is contained in:
45
.github/workflows/hrp-release.yml
vendored
Normal file
45
.github/workflows/hrp-release.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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.23
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: ${{ matrix.goos }}
|
||||
goarch: ${{ matrix.goarch }}
|
||||
project_path: "." # go build ./main.go
|
||||
binary_name: "hrp"
|
||||
ldflags: "-s -w"
|
||||
extra_files: LICENSE README.md docs/CHANGELOG.md
|
||||
post_command: |
|
||||
echo "ASSET_PATH=$INPUT_PROJECT_PATH/$BUILD_ARTIFACTS_FOLDER/$RELEASE_ASSET_FILE" >> $GITHUB_ENV
|
||||
- name: Setup 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 }}
|
||||
- name: Upload artifacts to aliyun OSS
|
||||
run: |
|
||||
ossutil cp -rf scripts/install.sh oss://httprunner/
|
||||
ossutil cp -rf ${{ env.ASSET_PATH }} oss://httprunner/
|
||||
- name: Test install.sh
|
||||
run: bash -c "$(curl -ksSL https://httprunner.oss-cn-beijing.aliyuncs.com/install.sh)"
|
||||
Reference in New Issue
Block a user