From e867455275ea5de22069f500053f6807b49dc9c6 Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Wed, 11 Mar 2020 11:36:41 +1100 Subject: [PATCH] chore: rename ci files and fix release step --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++ .github/workflows/{go.yml => test.yml} | 28 +------------------------- 2 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/release.yml rename .github/workflows/{go.yml => test.yml} (76%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3a0034 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Go +on: [release] +jobs: + + release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Unshallow + run: git fetch --prune --unshallow + + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 76% rename from .github/workflows/go.yml rename to .github/workflows/test.yml index f8e1986..563ea50 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/test.yml @@ -75,7 +75,7 @@ jobs: tag: name: Tag runs-on: ubuntu-latest - needs: [lint, test] + needs: [lint, test, image-scan] if: github.ref == 'refs/heads/master' steps: @@ -95,29 +95,3 @@ jobs: run: $(yarn global bin)/semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release: - runs-on: ubuntu-latest - needs: [lint, test] - if: startsWith(github.ref, 'refs/tags/') - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Unshallow - run: git fetch --prune --unshallow - - - name: Set up Go - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v1 - with: - version: latest - args: release --rm-dist - key: ${{ secrets.YOUR_PRIVATE_KEY }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}