From e1a674a6be29e46dc5a48bad93b7ba5c42dc41cf Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 4 Oct 2020 21:01:48 +0800 Subject: [PATCH] =?utf8?q?=E5=A4=9A=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .github/workflows/go.yml | 66 ++++++++++++++++++++++++++++++++-------- VERSION | 2 +- 2 files changed, 54 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7f56bef..c39f7be 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,12 +2,14 @@ name: Go on: push: + branches: + - master paths: - 'VERSION' jobs: - build: + ubuntu_build: name: Build runs-on: ubuntu-latest steps: @@ -20,20 +22,58 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - name: Build run: go build -v -o demo/demo.run -i demo/main.go - - name: zip - run: zip -q -r amd64.zip * + - name: Zip Release + uses: TheDoctor0/zip-release@0.4.1 + with: + filename: 'release_ubuntu.zip' + + - name: Release Drafter + # You may pin to the exact commit or the version. + # uses: release-drafter/release-drafter@06d4616a80cd7c09ea3cf12214165ad6c1859e67 + id: create_release + uses: release-drafter/release-drafter@v5.11.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload a Release Asset + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # The URL for uploading assets to the release + upload_url: ${{ steps.create_release.outputs.upload_url }} + # The path to the asset you want to upload + asset_path: ./release_ubuntu.zip + # The name of the asset you want to upload + asset_name: release_ubuntu.zip + # The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information + asset_content_type: application/zip + + windows_build: + name: Build + runs-on: windows-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15.2 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build + run: go build -v -o demo/demo.run -i demo/main.go + + - name: Zip Release + uses: TheDoctor0/zip-release@0.4.1 + with: + filename: 'release_windows.zip' - name: Release Drafter # You may pin to the exact commit or the version. @@ -51,8 +91,8 @@ jobs: # The URL for uploading assets to the release upload_url: ${{ steps.create_release.outputs.upload_url }} # The path to the asset you want to upload - asset_path: ./amd64.zip + asset_path: ./release_windows.zip # The name of the asset you want to upload - asset_name: amd64.zip + asset_name: release_windows.zip # The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information asset_content_type: application/zip diff --git a/VERSION b/VERSION index ca02194..7c1b542 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -202010042033 \ No newline at end of file +202010042101 \ No newline at end of file -- 2.39.2