From 3d85f6f78570b53e388fca8bf2fbc83ac8e0d25e Mon Sep 17 00:00:00 2001 From: rlardy-ulule Date: Thu, 31 Aug 2023 11:27:32 +0200 Subject: [PATCH] feat: split lint and release pipelines --- .github/workflows/{mover.yml => linter.yml} | 35 ++----------------- .github/workflows/release.yml | 38 +++++++++++++++++++++ 2 files changed, 41 insertions(+), 32 deletions(-) rename .github/workflows/{mover.yml => linter.yml} (50%) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/mover.yml b/.github/workflows/linter.yml similarity index 50% rename from .github/workflows/mover.yml rename to .github/workflows/linter.yml index f5b66d4..915cb39 100644 --- a/.github/workflows/mover.yml +++ b/.github/workflows/linter.yml @@ -1,14 +1,7 @@ -name: goreleaser +name: Linter on: push: - tags: - - '*' - -permissions: - contents: write - # packages: write - # issues: write env: GO_VERSION: 1.15 @@ -16,7 +9,7 @@ env: jobs: linter: timeout-minutes: 30 - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checking out repository @@ -35,30 +28,8 @@ jobs: - name: Run linters uses: golangci/golangci-lint-action@v3 with: - working-directory: ${{ env.WORKING_DIR }} version: latest args: -v -c .golangci.yml --timeout 10m # skip-cache: true # skip-pkg-cache: true - # skip-build-cache: true - - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - run: git fetch --force --tags - - - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GO_VERSION }} - - - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + # skip-build-cache: true \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7509b12 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + tags: + - '*' + +env: + GO_VERSION: 1.15 + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: git fetch --force --tags + + - uses: actions/setup-go@v4 + with: + go-version: ${{ env.GO_VERSION }} + + - uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file