From b83f1cab898fa7768aeb56ceeb1323a7738f8b81 Mon Sep 17 00:00:00 2001 From: hub Date: Sat, 3 Sep 2022 21:38:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/verify.yaml | 20 ++++++++++++++++++-- Makefile | 8 ++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 4b9fae2..de3e41b 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -1,8 +1,7 @@ name: '🚔' on: [ push, pull_request ] jobs: - verify: - name: 'Verify' + job: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -14,3 +13,20 @@ jobs: - run: make lint test - run: make release if: startsWith(github.event.ref, 'refs/tags/v') + - uses: actions/create-release@v1 + if: startsWith(github.event.ref, 'refs/tags/v') + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: 'automated release of ${{ github.ref }} at commit ${{ github.sha }}' + draft: false + prerelease: false + - uses: csexton/release-asset-action@v2 + if: startsWith(github.event.ref, 'refs/tags/v') + with: + pattern: "out/*" + github-token: ${{ secrets.GITHUB_TOKEN }} + release-url: ${{ steps.create_release.outputs.upload_url }} diff --git a/Makefile b/Makefile index 5d30309..204b69f 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ out/$(BIN_NAME)-dev: clean lint test release: clean mkdir -p out - GOOS=linux GOARCH=amd64 go build -o out/$(BIN_NAME)-linux - GOOS=linux GOARCH=arm64 go build -o out/$(BIN_NAME)-linux-arm64 - GOOS=darwin GOARCH=amd64 go build -o out/$(BIN_NAME)-darwin - GOOS=darwin GOARCH=arm64 go build -o out/$(BIN_NAME)-darwin-arm64 + GOOS=linux GOARCH=amd64 go build -o out/$(BIN_NAME)-linux + GOOS=linux GOARCH=arm64 go build -o out/$(BIN_NAME)-linux-arm64 + GOOS=darwin GOARCH=amd64 go build -o out/$(BIN_NAME)-darwin + GOOS=darwin GOARCH=arm64 go build -o out/$(BIN_NAME)-darwin-arm64 GOOS=windows GOARCH=amd64 go build -o out/$(BIN_NAME)-windows clean: