From 07db376a19147889bd6c4f9d46ce81de25c80a04 Mon Sep 17 00:00:00 2001 From: omissis Date: Sun, 11 Sep 2022 16:49:18 +0200 Subject: [PATCH] chore: refactor release pipeline --- .github/workflows/release.yaml | 42 ++++------------------------------ 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f12c115..e4b5235 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ concurrency: cancel-in-progress: true jobs: - qa: + release: runs-on: ubuntu-22.04 steps: - name: Checkout @@ -41,24 +41,8 @@ jobs: args: -v --color=always --config=.rules/.golangci.yml ./... - name: Run tests run: go test -v ./... - prerelease: - needs: qa - if: ${{ contains(github.ref_name, '-') }} - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Fetch all tags - run: git fetch --force --tags - - name: Setup Git Crypt - run: sudo apt-get install -y git-crypt - - name: Setup Golang - uses: actions/setup-go@v3 - with: - go-version: '^1.19.0' - - name: Run GoReleaser + - name: Run GoReleaser for pre-release + if: ${{ contains(github.ref_name, '-') }} uses: goreleaser/goreleaser-action@v3 with: distribution: goreleaser @@ -67,24 +51,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO_VERSION: '1.19.0' - release: - needs: qa - if: ${{ !contains(github.ref_name, '-') }} - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Fetch all tags - run: git fetch --force --tags - - name: Setup Git Crypt - run: sudo apt-get install -y git-crypt - - name: Setup Golang - uses: actions/setup-go@v3 - with: - go-version: '^1.19.0' - - name: Run GoReleaser + - name: Run GoReleaser for release + if: ${{ contains(github.ref_name, '-') }} uses: goreleaser/goreleaser-action@v3 with: distribution: goreleaser