Browse Source

增加 go

liuyuqi-dellpc 2 years ago
parent
commit
f537f05776

+ 22 - 0
android-eclipse/.github/workflows/main.yml

@@ -0,0 +1,22 @@
+
+name: Android CI
+
+on:
+  push:
+    branches: [ as ]
+  pull_request:
+    branches: [ as ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: set up JDK 1.8
+      uses: actions/setup-java@v1
+      with:
+        java-version: 1.8
+    - name: Build Debug APK
+      run:

+ 28 - 0
android/.github/workflows/main.yml

@@ -0,0 +1,28 @@
+
+name: Android CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: set up JDK 1.8
+      uses: actions/setup-java@v1
+      with:
+        java-version: 1.8
+    - name: Build Debug APK
+      run: ./gradlew assembleDebug
+    - name: Releasing using Hub
+      uses: ShaunLWM/action-release-debugapk@master
+      env:
+        GITHUB_TOKEN: ${{secrets.TOKEN}}
+        APP_FOLDER: app
+        RELEASE_TITLE: New Build

+ 23 - 3
flutter/.github/workflows/main.yml

@@ -13,16 +13,36 @@ jobs:
         uses: actions/setup-java@v1.3.0
         with:
           java-version: "12.x"
+      
       - name: Flutter action
         uses: subosito/flutter-action@v1.1.1
         with:
           channel: "stable"
           flutter-version: "1.12.x"
-      - run: flutter pub get
+      
+      - name: Cache Dependencies
+        id: cache
+        uses: actions/cache@v1
+        with:
+          path: node_modules
+          key: ${{runner.OS}}-npm-caches-${{ hashFiles('pubspec.lock') }}
+
+      - name: Install Dependencies
+        if: steps.cache.outputs.cache-hit != 'true'
+        run: flutter pub get
+
       - run: flutter build apk --release
-      - run: pwd
+
+      # output some file:
       - name: artifact
         uses: actions/upload-artifact@v1
         with:
           name: chat-app-ui
-          path: /home/runner/work/chat-app-ui/chat-app-ui/build/app/outputs
+          path: /home/runner/work/chat-app-ui/chat-app-ui/build/app/outputs
+      
+      # #  Release
+      # - name: Release apk
+      #   uses: ncipollo/release-action@v1.5.0
+      #   with:
+      #     artifacts: "build/app/outputs/apk/release/*.apk"
+      #     token: ${{ secrets.GITHUB_RElEASE_TOKEN }}

+ 40 - 0
go/.github/workflows/main.yml

@@ -0,0 +1,40 @@
+name: Go
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: Set up Go 1.13
+      uses: actions/setup-go@v1
+      with:
+        go-version: 1.13
+      id: go
+
+    - 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 output
+
+    - name: artifact
+      uses: actions/upload-artifact@v1
+      with:
+        name: artifact
+        path: output