From e890a9a1aff1f3ad43464db6e96606fa6f14c946 Mon Sep 17 00:00:00 2001 From: Hudson Newey Date: Sun, 29 Sep 2024 22:57:20 +1000 Subject: [PATCH] Add release workflow --- .github/workflows/go.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..405282f --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,34 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date + '%Y-%m-%d-%H:%M:%S.%3NZ')" + + - name: Tag commit + uses: tvdias/github-tagger@v0.0.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + tag: "${{ steps.date.outputs.date }}" + + - uses: ncipollo/release-action@v1 + with: + artifacts: "build/2rm" + tag: "${{ steps.date.outputs.date }}"