From 867e2143f2d1b3322ab101afc37c7bcece4c68b1 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:11:10 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/linux.yml | 42 ---------------------- .github/workflows/push.yml | 54 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ .github/workflows/windows.yml | 41 ---------------------- README.md | 6 ++-- 5 files changed, 123 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/push.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 950bd00d..00000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Compile ZeroBot-Plugin-linux -on: - push: - branches: - - master - -env: - GITHUB_TOKEN: ${{ github.token }} - -jobs: - my-job: - name: Build ZeroBot-Plugin-linux 🚀 - runs-on: ubuntu-latest - steps: - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Cache Go - id: cache - uses: actions/cache@v2 - with: - # A list of files, directories, and wildcard patterns to cache and restore - path: ~/go/pkg/mod - key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} - - - name: Tidy Go modules - run: go mod tidy - - - name: Build - run: go build -ldflags="-s -w" -o artifacts/ZeroBot-Plugin-linux - - - name: Upload Build Artifact - uses: actions/upload-artifact@v2 - with: - name: ZeroBot-Plugin-linux - path: ./artifacts diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..1e255556 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,54 @@ +name: 最新版 +on: + push: + branches: + - master + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + my-job: + name: Build ZeroBot-Plugin on Push 🚀 + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Cache Go + id: cache + uses: actions/cache@v2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + + - name: Tidy Go modules + run: go mod tidy + + - name: Build linux-x64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 + - name: Build linux-x86 + run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 + - name: Build windows-x64 + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe + - name: Build windows-x86 + run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe + - name: Build armv7 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build armv6 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build mips + run: GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-mips + + - name: Upload Build Artifact + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-* + path: ./artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e2de2135 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: 稳定版 +on: + push: + tags: + - v* + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + my-job: + name: Build ZeroBot-Plugin on Push Tag 🚀 + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Cache Go + id: cache + uses: actions/cache@v2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + + - name: Tidy Go modules + run: go mod tidy + + - name: Build linux-x64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 + - name: Build linux-x86 + run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 + - name: Build windows-x64 + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe + - name: Build windows-x86 + run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe + - name: Build armv7 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build armv6 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build mips + run: GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-mips + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts + asset_name: zerobot-plugin-* + asset_content_type: application/octet-stream \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 14d17f28..00000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Compile ZeroBot-Plugin-windows -on: - push: - branches: - - master - -env: - GITHUB_TOKEN: ${{ github.token }} - -jobs: - my-job: - name: Build ZeroBot-Plugin-windows 🚀 - runs-on: windows-latest - steps: - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Cache Go - id: cache - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} - - - name: Tidy Go modules - run: go mod tidy - - - name: Build - run: go build -ldflags="-s -w" -o artifacts/ZeroBot-Plugin-windows.exe - - - name: Upload Build Artifact - uses: actions/upload-artifact@v2 - with: - name: ZeroBot-Plugin-windows.exe - path: ./artifacts diff --git a/README.md b/README.md index d20cf5d7..579c2c73 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,6 @@ [![License](https://img.shields.io/github/license/Yiwen-Chan/OneBot-YaYa.svg?style=flat-square&logo=gnu)](https://raw.githubusercontent.com/FloatTech/ZeroBot-Plugin/master/LICENSE) [![qq group](https://img.shields.io/badge/group-1048452984-red?style=flat-square&logo=tencent-qq)](https://jq.qq.com/?_wv=1027&k=QMb7x1mM) -[![Compile ZeroBot-Plugin-linux](https://github.com/FloatTech/ZeroBot-Plugin/actions/workflows/linux.yml/badge.svg?branch=master)](https://github.com/FloatTech/ZeroBot-Plugin/actions/workflows/linux.yml) -[![Compile ZeroBot-Plugin-windows](https://github.com/FloatTech/ZeroBot-Plugin/actions/workflows/windows.yml/badge.svg?branch=master)](https://github.com/FloatTech/ZeroBot-Plugin/actions/workflows/windows.yml) - @@ -117,6 +114,9 @@ | [yyuueexxiinngg/cqhttp-mirai](https://github.com/yyuueexxiinngg/cqhttp-mirai) | [Mirai](https://github.com/mamoe/mirai) | yyuueexxiinngg | | | [takayama-lily/onebot](https://github.com/takayama-lily/onebot) | [OICQ](https://github.com/takayama-lily/oicq) | takayama | | +### 使用稳定版 +可以前往[Release](https://github.com/FloatTech/ZeroBot-Plugin/releases)页面下载对应系统的稳定版,默认开启全部插件。 + ### 本地运行 1. 下载安装 [Go](https://studygolang.com/dl/golang/go1.16.2.windows-amd64.msi) 环境 2. 下载本项目[压缩包](https://github.com/Yiwen-Chan/ZeroBot-Plugin/archive/master.zip),本地解压 From 5af995940816ecb7b5c866dc049e27bf6ff99fd3 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:20:09 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/push.yml | 6 ++---- .github/workflows/release.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1e255556..16623f35 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,12 +40,10 @@ jobs: run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe - name: Build windows-x86 run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe - - name: Build armv7 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build arm64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 - name: Build armv6 run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - name: Build mips - run: GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-mips - name: Upload Build Artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2de2135..d164ecbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,12 +40,10 @@ jobs: run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe - name: Build windows-x86 run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe - - name: Build armv7 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + - name: Build arm64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 - name: Build armv6 run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - name: Build mips - run: GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-mips - name: Create Release id: create_release From 2900b4b616f5ba3741ccc2e41a95eafa939b29c7 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:22:47 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/{suggester.yml => pulllint.yml} | 2 +- .../workflows/{golint.yml => pushlint.yml} | 0 .github/workflows/release.yml | 30 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) rename .github/workflows/{suggester.yml => pulllint.yml} (98%) rename .github/workflows/{golint.yml => pushlint.yml} (100%) diff --git a/.github/workflows/suggester.yml b/.github/workflows/pulllint.yml similarity index 98% rename from .github/workflows/suggester.yml rename to .github/workflows/pulllint.yml index a0c6b202..72731fdc 100644 --- a/.github/workflows/suggester.yml +++ b/.github/workflows/pulllint.yml @@ -1,4 +1,4 @@ -name: Lint +name: PullLint on: [pull_request] jobs: golangci: diff --git a/.github/workflows/golint.yml b/.github/workflows/pushlint.yml similarity index 100% rename from .github/workflows/golint.yml rename to .github/workflows/pushlint.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d164ecbf..d411c2e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,19 +46,19 @@ jobs: run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - name: Create Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./artifacts - asset_name: zerobot-plugin-* - asset_content_type: application/octet-stream \ No newline at end of file + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts + asset_name: zerobot-plugin-* + asset_content_type: application/octet-stream \ No newline at end of file From 93ee86520b37c0ad186aad965fccf297cdfeed5d Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:26:33 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yml | 52 ++++++++++++++ .github/workflows/{pulllint.yml => pull.yml} | 0 .github/workflows/push.yml | 71 +++++++------------- .github/workflows/pushlint.yml | 31 --------- .github/workflows/release.yml | 2 +- 5 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/latest.yml rename .github/workflows/{pulllint.yml => pull.yml} (100%) delete mode 100644 .github/workflows/pushlint.yml diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml new file mode 100644 index 00000000..740b3399 --- /dev/null +++ b/.github/workflows/latest.yml @@ -0,0 +1,52 @@ +name: 最新版 +on: + push: + branches: + - master + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + my-job: + name: Build ZeroBot-Plugin on Push 🚀 + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Cache Go + id: cache + uses: actions/cache@v2 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: ~/go/pkg/mod + key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + + - name: Tidy Go modules + run: go mod tidy + + - name: Build linux-x64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 + - name: Build linux-x86 + run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 + - name: Build windows-x64 + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe + - name: Build windows-x86 + run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe + - name: Build arm64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 + - name: Build armv6 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 + + - name: Upload Build Artifact + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin + path: ./artifacts diff --git a/.github/workflows/pulllint.yml b/.github/workflows/pull.yml similarity index 100% rename from .github/workflows/pulllint.yml rename to .github/workflows/pull.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 16623f35..c07742d4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,52 +1,31 @@ -name: 最新版 -on: - push: - branches: - - master - -env: - GITHUB_TOKEN: ${{ github.token }} - +name: PushLint +on: [push] jobs: - my-job: - name: Build ZeroBot-Plugin on Push 🚀 + golangci: + name: lint runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: latest - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 + # Optional: working directory, useful for monorepos + # working-directory: somedir - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Cache Go - id: cache - uses: actions/cache@v2 - with: - # A list of files, directories, and wildcard patterns to cache and restore - path: ~/go/pkg/mod - key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} + # Optional: golangci-lint command line arguments. + # args: --issues-exit-code=0 - - name: Tidy Go modules - run: go mod tidy - - - name: Build linux-x64 - run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 - - name: Build linux-x86 - run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 - - name: Build windows-x64 - run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe - - name: Build windows-x86 - run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe - - name: Build arm64 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 - - name: Build armv6 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - - name: Upload Build Artifact - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-* - path: ./artifacts + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true + + # Optional: if set to true then the action will use pre-installed Go. + # skip-go-installation: true + + # Optional: if set to true then the action don't cache or restore ~/go/pkg. + # skip-pkg-cache: true + + # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. + # skip-build-cache: true diff --git a/.github/workflows/pushlint.yml b/.github/workflows/pushlint.yml deleted file mode 100644 index c07742d4..00000000 --- a/.github/workflows/pushlint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: PushLint -on: [push] -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: latest - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 - - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true - - # Optional: if set to true then the action will use pre-installed Go. - # skip-go-installation: true - - # Optional: if set to true then the action don't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. - # skip-build-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d411c2e6..97aff45e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,5 +60,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./artifacts - asset_name: zerobot-plugin-* + asset_name: zerobot-plugin asset_content_type: application/octet-stream \ No newline at end of file From 81ccf8e4f59afdbc4385b6a5f89a1e3c3eb026cf Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:34:38 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 740b3399..e8f8fd65 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -34,19 +34,9 @@ jobs: - name: Build linux-x64 run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 - - name: Build linux-x86 - run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 - - name: Build windows-x64 - run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe - - name: Build windows-x86 - run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe - - name: Build arm64 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 - - name: Build armv6 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - name: Upload Build Artifact uses: actions/upload-artifact@v2 with: name: zerobot-plugin - path: ./artifacts + path: ./artifacts/zerobot-plugin-* \ No newline at end of file From 28b9d0b18f1cc44d2b18fb3a7005ddfa798d24f5 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:40:06 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yml | 42 +++++++++++++++++++++++++++--- .github/workflows/release.yml | 49 ++++++++++++++++++++++++++++++++--- 2 files changed, 84 insertions(+), 7 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index e8f8fd65..fa9334d4 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -34,9 +34,45 @@ jobs: - name: Build linux-x64 run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 + - name: Build linux-x86 + run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 + - name: Build windows-x64 + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe + - name: Build windows-x86 + run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe + - name: Build arm64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 + - name: Build armv6 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - name: Upload Build Artifact + - name: Upload Build Artifact Linux x64 uses: actions/upload-artifact@v2 with: - name: zerobot-plugin - path: ./artifacts/zerobot-plugin-* \ No newline at end of file + name: zerobot-plugin-linux-x64 + path: ./artifacts/zerobot-plugin-linux-x64 + - name: Upload Build Artifact Linux x86 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-x86 + path: ./artifacts/zerobot-plugin-linux-x86 + - name: Upload Build Artifact Windows x64 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-windows-x64.exe + path: ./artifacts/zerobot-plugin-windows-x64.exe + - name: Upload Build Artifact Windows x86 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-windows-x86.exe + path: ./artifacts/zerobot-plugin-windows-x86.exe + - name: Upload Build Artifact Linux arm64 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-arm64 + path: ./artifacts/zerobot-plugin-linux-arm64 + - name: Upload Build Artifact Linux armv6 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-armv6 + path: ./artifacts/zerobot-plugin-linux-armv6 + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97aff45e..1c038243 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,11 +54,52 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset + - name: Upload Release Asset Linux x64 id: upload-release-asset uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./artifacts - asset_name: zerobot-plugin - asset_content_type: application/octet-stream \ No newline at end of file + asset_path: ./artifacts/zerobot-plugin-linux-x64 + asset_name: zerobot-plugin-linux-x64 + asset_content_type: application/octet-stream + - name: Upload Release Asset Linux x86 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts/zerobot-plugin-linux-x86 + asset_name: zerobot-plugin-linux-x86 + asset_content_type: application/octet-stream + - name: Upload Release Asset Windows x64 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts/zerobot-plugin-windows-x64.exe + asset_name: zerobot-plugin-windows-x64.exe + asset_content_type: application/octet-stream + - name: Upload Release Asset Windows x86 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts/zerobot-plugin-windows-x86.exe + asset_name: zerobot-plugin-windows-x86.exe + asset_content_type: application/octet-stream + - name: Upload Release Asset ARM64 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts/zerobot-plugin-linux-arm64 + asset_name: zerobot-plugin-linux-arm64 + asset_content_type: application/octet-stream + - name: Upload Release Asset ARMv6 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./artifacts/zerobot-plugin-linux-armv6 + asset_name: zerobot-plugin-linux-armv6 + asset_content_type: application/octet-stream + \ No newline at end of file From 8147cd26dc91ee85f6ebabd879abb5c71b185b41 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:43:06 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c038243..8d9a8bbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: prerelease: false - name: Upload Release Asset Linux x64 - id: upload-release-asset + id: upload-release-asset-lx64 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps @@ -63,7 +63,7 @@ jobs: asset_name: zerobot-plugin-linux-x64 asset_content_type: application/octet-stream - name: Upload Release Asset Linux x86 - id: upload-release-asset + id: upload-release-asset-lx86 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps @@ -71,7 +71,7 @@ jobs: asset_name: zerobot-plugin-linux-x86 asset_content_type: application/octet-stream - name: Upload Release Asset Windows x64 - id: upload-release-asset + id: upload-release-asset-wx64 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps @@ -79,7 +79,7 @@ jobs: asset_name: zerobot-plugin-windows-x64.exe asset_content_type: application/octet-stream - name: Upload Release Asset Windows x86 - id: upload-release-asset + id: upload-release-asset-wx86 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps @@ -87,7 +87,7 @@ jobs: asset_name: zerobot-plugin-windows-x86.exe asset_content_type: application/octet-stream - name: Upload Release Asset ARM64 - id: upload-release-asset + id: upload-release-asset-arm64 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps @@ -95,7 +95,7 @@ jobs: asset_name: zerobot-plugin-linux-arm64 asset_content_type: application/octet-stream - name: Upload Release Asset ARMv6 - id: upload-release-asset + id: upload-release-asset-armv6 uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps From 4abd3803a323b70d3575db9b34d480a5a500a175 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:46:03 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yml | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index fa9334d4..f898a531 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -45,34 +45,8 @@ jobs: - name: Build armv6 run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - name: Upload Build Artifact Linux x64 + - name: Upload Build Artifact uses: actions/upload-artifact@v2 with: - name: zerobot-plugin-linux-x64 - path: ./artifacts/zerobot-plugin-linux-x64 - - name: Upload Build Artifact Linux x86 - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-linux-x86 - path: ./artifacts/zerobot-plugin-linux-x86 - - name: Upload Build Artifact Windows x64 - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-windows-x64.exe - path: ./artifacts/zerobot-plugin-windows-x64.exe - - name: Upload Build Artifact Windows x86 - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-windows-x86.exe - path: ./artifacts/zerobot-plugin-windows-x86.exe - - name: Upload Build Artifact Linux arm64 - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-linux-arm64 - path: ./artifacts/zerobot-plugin-linux-arm64 - - name: Upload Build Artifact Linux armv6 - uses: actions/upload-artifact@v2 - with: - name: zerobot-plugin-linux-armv6 - path: ./artifacts/zerobot-plugin-linux-armv6 - + name: zerobot-plugin-all.zip + path: ./artifacts/zerobot-plugin-* \ No newline at end of file