From 861ecdc5f805afdea9a1dac4773d63651580166c Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Fri, 14 Oct 2022 09:18:49 +0530 Subject: [PATCH] Testing CI build --- .github/workflows/ci.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2036720e9..696e1b80a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: pull_request: branches: [ main ] push: - branches: [ main ] + branches: [ auto-version ] tags: [ 'v*.*.*' ] permissions: @@ -41,7 +41,7 @@ jobs: # the results will cascade onto both testing and linting. - name: Setup Golang with cache uses: ./.github/actions/go-setup-cache - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.docfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.docfileschanged == 'true' with: go-version-file: src/go.mod @@ -53,33 +53,33 @@ jobs: needs: [Precheck, Checkout] environment: Testing runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.docfileschanged == 'true' # docsfileschanged also includes srcfileschanged + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.docfileschanged == 'true' # docsfileschanged also includes srcfileschanged steps: - uses: actions/checkout@v3 - name: Setup Golang with cache - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' uses: magnetikonline/action-golang-cache@v3 with: go-version-file: src/go.mod - name: Generate CLI Docs - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' working-directory: ./src run: | go run ./cmd/mdgen/mdgen.go generate # migrate generated md files into /docs/docs/cli - name: Move CLI .md to Docs - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' run: | mkdir -p ./docs/docs/cli mv ./src/cmd/mdgen/cli_markdown/* ./docs/docs/cli/ rm -R ./src/cmd/mdgen/cli_markdown/ - uses: actions/upload-artifact@master - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' name: Upload cli docs as artifacts with: name: cli-docs @@ -106,7 +106,7 @@ jobs: needs: [Precheck, Checkout] environment: Testing runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' defaults: run: working-directory: src @@ -166,7 +166,7 @@ jobs: needs: [Precheck, Checkout] environment: Testing runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' || needs.precheck.outputs.srcfileschanged == 'true' defaults: run: working-directory: src @@ -198,7 +198,7 @@ jobs: SetEnv: environment: Testing - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' runs-on: ubuntu-latest outputs: environment: ${{ steps.set-env.outputs.environment }} @@ -219,7 +219,7 @@ jobs: needs: [Test-Suite, Linting, Docs-Linting, SetEnv] environment: ${{ needs.SetEnv.outputs.environment }} runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' defaults: run: working-directory: src @@ -259,7 +259,7 @@ jobs: needs: [Test-Suite, Linting, Docs-Linting, SetEnv] environment: ${{ needs.SetEnv.outputs.environment }} runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' defaults: run: working-directory: docs @@ -299,7 +299,7 @@ jobs: needs: [Test-Suite, Linting, Docs-Linting, SetEnv] environment: ${{ needs.SetEnv.outputs.environment }} runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/auto-version' defaults: run: working-directory: build @@ -312,7 +312,7 @@ jobs: - name: Build Corso Binaries run: > export CORSO_BUILD_LDFLAGS="-X 'github.com/alcionai/corso/src/internal/events.RudderStackWriteKey=${{ secrets.RUDDERSTACK_CORSO_WRITE_KEY }}' \ - -X 'github.com/alcionai/corso/src/internal/events.RudderStackDataPlaneURL=${{ secrets.RUDDERSTACK_CORSO_DATA_PLANE_URL }}' + -X 'github.com/alcionai/corso/src/internal/events.RudderStackDataPlaneURL=${{ secrets.RUDDERSTACK_CORSO_DATA_PLANE_URL }}' \ -X 'github.com/alcionai/corso/src/cli.version=$(git describe --exact-match --tags $(git rev-parse HEAD) 2>/dev/null || echo unreleased)-$(git rev-parse --short HEAD)'" ./build.sh --platforms ${{ env.PLATFORMS }}