From c2a9516c1aec43121a4eca5f1a612a60ded62d26 Mon Sep 17 00:00:00 2001 From: Bryan Bailey Date: Thu, 29 Aug 2024 15:59:41 -0400 Subject: [PATCH] build(yoink): added release action --- .github/workflows.yml/release.yml | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows.yml/release.yml diff --git a/.github/workflows.yml/release.yml b/.github/workflows.yml/release.yml new file mode 100644 index 0000000..aff074d --- /dev/null +++ b/.github/workflows.yml/release.yml @@ -0,0 +1,44 @@ +name: Yoink Release + +on: + push: + branches: + - main + tags: + - v* + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + - uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -o ./yoink + + - name: Release + uses: ./.github/actions/release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: ${{ github.event.head_commit.message }} + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./yoink + asset_name: yoink + asset_content_type: application/x-executable