Переглянути джерело

Merge pull request #117 from gtardif/auto-release

Release CI config
Guillaume Tardif 5 роки тому
батько
коміт
fce6d78750
1 змінених файлів з 35 додано та 0 видалено
  1. 35 0
      .github/workflows/release.yaml

+ 35 - 0
.github/workflows/release.yaml

@@ -0,0 +1,35 @@
+name: releaser
+
+on:
+  push:
+    tags:
+      - 'v*'
+jobs:
+  upload-release:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Set up Go 1.14
+        uses: actions/setup-go@v1
+        with:
+          go-version: 1.14
+        id: go
+
+      - name: Checkout code into the Go module directory
+        uses: actions/checkout@v2
+
+      - uses: actions/cache@v1
+        with:
+          path: ~/go/pkg/mod
+          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+          restore-keys: |
+            ${{ runner.os }}-go-
+
+      - name: Build
+        run: make -f builder.Makefile cross
+
+      - uses: ncipollo/release-action@v1
+        with:
+          artifacts: "bin/*"
+          prerelease: true
+          token: ${{ secrets.GITHUB_TOKEN }}
+