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 }}