]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
fix dep
authorqydysky <qydysky@foxmail.com>
Fri, 23 Oct 2020 07:43:12 +0000 (15:43 +0800)
committerqydysky <qydysky@foxmail.com>
Fri, 23 Oct 2020 07:43:12 +0000 (15:43 +0800)
.github/workflows/go.yml
.github/workflows/test.yml [new file with mode: 0644]

index e74d9c022daf727c350511b710aac828ff8f8e53..010a584e49ebe869f78a52c942be372b22283921 100644 (file)
@@ -2,6 +2,8 @@ name: Go
 
 on:
   push:
+    branches:
+    - 'master'
     paths:
     - 'VERSION'
 
@@ -38,7 +40,7 @@ jobs:
     - name: Set up Go
       uses: actions/setup-go@v2
       with:
-        go-version: ^1.15.2
+        go-version: ^1.15.3
       id: go
 
     - name: Check out code
@@ -83,7 +85,7 @@ jobs:
     - name: Set up Go
       uses: actions/setup-go@v2
       with:
-        go-version: ^1.15.2
+        go-version: ^1.15.3
       id: go
 
     - name: Set up C
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644 (file)
index 0000000..36d0453
--- /dev/null
@@ -0,0 +1,102 @@
+name: Go
+
+on:
+  push:
+    branches:
+    - '!master'
+    paths:
+    - 'VERSION'
+
+jobs:
+
+  Release_Drafter:
+    name: Release_Drafter
+    runs-on: ubuntu-latest
+    steps:
+
+    - 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: set upload_url
+      id: set_upload_url
+      uses: noobly314/share-data@v1
+      with:
+        share-id: release_url
+        mode: set
+        key: url
+        value: ${{ steps.create_release.outputs.upload_url }}
+
+  ubuntu_build:
+    name: ubuntu_build
+    needs: Release_Drafter
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: Set up Go
+      uses: actions/setup-go@v2
+      with:
+        go-version: ^1.15.3
+      id: go
+
+    - name: Check out code
+      uses: actions/checkout@v2
+        
+    - name: Build
+      run: |
+        sudo apt-get install libgtk-3-dev libcairo2-dev libglib2.0-dev
+        go build -v -o demo/demo.run -i demo/main.go
+      
+    - name: zip
+      run: zip -q -r release_ubuntu.zip *
+      
+    - name: Upload a Build Artifact
+      uses: actions/upload-artifact@v2.2.0
+      with:
+        path: ./release_ubuntu.zip
+
+  windows_build:
+    name: windows_build
+    needs: Release_Drafter
+    runs-on: windows-latest
+    steps:
+
+    - name: Set up Go
+      uses: actions/setup-go@v2
+      with:
+        go-version: ^1.15.3
+      id: go
+
+    - name: Set up C
+      run: |
+        echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
+
+    - name: Set up Gtk
+      uses: msys2/setup-msys2@v2
+      with:
+        msystem: MINGW64
+        path-type: inherit
+        update: true
+        install: 'mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gtk2'
+
+    - name: Check out code
+      uses: actions/checkout@v2
+
+    - shell: msys2 {0}
+      run: |
+        export CGO_LDFLAGS_ALLOW="-Wl.*"
+        export CGO_CFLAGS_ALLOW="-Wl.*"
+        export CGO_CXXFLAGS_ALLOW="-Wl.*"
+        go build -v -buildmode=exe -o demo/demo.exe -i demo/main.go
+
+    - name: zip
+      run: .\7za.exe a -r .\release_windows.zip ./
+
+    - name: Upload a Build Artifact
+      uses: actions/upload-artifact@v2.2.0
+      with:
+        path: ./release_windows.zip