Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Testing CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Oct 14, 2022
1 parent b42cdf8 commit 9e3b226
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
branches: [ auto-version ]
tags: [ 'v*.*.*' ]

permissions:
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 9e3b226

Please sign in to comment.