From 71c4677952fcb6a9fb4beb12fb55801ae2432f13 Mon Sep 17 00:00:00 2001 From: hudson-newey Date: Sun, 29 Sep 2024 23:00:49 +1000 Subject: [PATCH] Improve release workflow --- .github/workflows/go.yml | 34 ---------------------------------- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 405282f..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,34 +0,0 @@ -# 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 }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..95a1cff --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Publish + +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.22.2" + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M%S')" + + - 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 }}"