diff --git a/.github/workflows/build-publish.yaml b/.github/workflows/build-publish.yaml index d2b74806..a13067d3 100644 --- a/.github/workflows/build-publish.yaml +++ b/.github/workflows/build-publish.yaml @@ -6,6 +6,11 @@ on: pull_request: branches: - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} env: REGISTRY: ghcr.io diff --git a/.github/workflows/buildTestBinaries.yml b/.github/workflows/buildTestBinaries.yml index 7c87d9aa..f1012257 100644 --- a/.github/workflows/buildTestBinaries.yml +++ b/.github/workflows/buildTestBinaries.yml @@ -8,6 +8,11 @@ on: branches: - main pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -23,9 +28,10 @@ jobs: with: fetch-depth: 0 submodules: true - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.20" # The Go version to download (if necessary) and use. + check-latest: true - name: Set version and ui_file id: vars @@ -45,7 +51,7 @@ jobs: UI_FILE: ${{ steps.vars.outputs.ui_file }} - name: Upload assets - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: client_application-${{ steps.vars.outputs.version }} path: | diff --git a/.github/workflows/checkFormat.yml b/.github/workflows/checkFormat.yml index ab8b88aa..232cf2a1 100644 --- a/.github/workflows/checkFormat.yml +++ b/.github/workflows/checkFormat.yml @@ -5,6 +5,11 @@ on: pull_request: branches: - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} jobs: format: @@ -15,9 +20,10 @@ jobs: with: # fetch branches and history so `git merge-base` in check-format-on-diff works correctly fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.20" # The Go version to download (if necessary) and use. + check-latest: true - name: Check formatting shell: bash diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index a693a4e8..a7893865 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -9,15 +9,22 @@ on: pull_request: branches: - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} + jobs: golangci: name: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.20" # The Go version to download (if necessary) and use. + check-latest: true - run: go version - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8516c574..f603df34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,17 @@ name: goreleaser on: push: - # run only against tags + branches: + - main tags: - - '*' + # Create a release on a tag push + - "*" + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} permissions: contents: write @@ -24,24 +32,39 @@ jobs: - name: Fetch all tags run: git fetch --force --tags - - - name: Set up Go - uses: actions/setup-go@v4 + + - name: Set up Go + uses: actions/setup-go@v5 with: - go-version: 1.20 + go-version: "1.20" + - name: Print Go version + run: go version + + - name: Print supported platforms + run: go tool dist list + - name: Set ui_file id: vars run: | echo "ui_file=$(pwd)/.tmp/ui.tar.gz" >> $GITHUB_OUTPUT - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 + + - name: Set args for goreleaser + id: args + run: | + if ${{ github.ref_type == 'tag' }} ; then + echo "args=release --rm-dist" >> $GITHUB_OUTPUT + else + echo "args=release --rm-dist --skip-validate --skip-publish" >> $GITHUB_OUTPUT + fi + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: latest - args: release --rm-dist + args: ${{ steps.args.outputs.args }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} UI_SEPARATOR: "--------UI--------" diff --git a/.github/workflows/staticAnalysis.yml b/.github/workflows/staticAnalysis.yml index f790ff71..0f788b6f 100644 --- a/.github/workflows/staticAnalysis.yml +++ b/.github/workflows/staticAnalysis.yml @@ -5,6 +5,11 @@ on: pull_request: branches: - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} jobs: analysis: @@ -12,9 +17,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.20" # The Go version to download (if necessary) and use. + check-latest: true - run: go version - name: Run go vet diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc48a560..7c6d077d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,11 @@ on: tags: - "*" pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != 'main' }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -23,9 +28,10 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.20" # The Go version to download (if necessary) and use. + check-latest: true - name: Run a test run: make test