Răsfoiți Sursa

The release builder

jamesread 4 ani în urmă
părinte
comite
31411d0e95
1 a modificat fișierele cu 48 adăugiri și 0 ștergeri
  1. 48 0
      .github/workflows/build-tag.yml

+ 48 - 0
.github/workflows/build-tag.yml

@@ -0,0 +1,48 @@
+name: "Build Tag"
+
+on:
+  push:
+    tags: 
+      - '*'
+
+jobs:
+  build-tag:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Setup Go
+        uses: actions/setup-go@v2
+        with: 
+          go-version: '^1.16.0'
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_KEY }}
+
+      - name: grpc
+        run: make grpc
+
+      - name: goreleaser
+        uses: goreleaser/goreleaser-action@v2
+        with: 
+          distribution: goreleaser
+          version: latest
+          args: release --rm-dist 
+        env: 
+          GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+
+      - name: Archive binaries
+        uses: actions/upload-artifact@v2
+        with: 
+          name: dist
+          path: dist/OliveTin*.*
+
+      - name: Archive integration tests
+        uses: actions/upload-artifact@v2
+        with: 
+          name: integration-tests
+          path: integration-tests