]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
多平台
authorqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 13:01:48 +0000 (21:01 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 13:01:48 +0000 (21:01 +0800)
.github/workflows/go.yml
VERSION

index 7f56beff89d3cde126619a6fedbfed2c1f6c0e25..c39f7beed4a2a845a4dcca7d0e75d501f8cec46a 100644 (file)
@@ -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 ca0219494f02df4d321ccdc4e106e195ed0a2b38..7c1b54282d9cabd1d740819894149e43756daa5a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-202010042033
\ No newline at end of file
+202010042101
\ No newline at end of file