From cacbf67251a3e6eb01ce1f17b414e34a98dd810b Mon Sep 17 00:00:00 2001 From: Damien Goehrig Date: Fri, 8 Dec 2023 14:39:24 -0500 Subject: [PATCH] Update the generator --- .github/workflows/generator.yml | 24 ++++++++++++++---------- .github/workflows/go.yml | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index d48b1a6c..aec7e041 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -6,7 +6,7 @@ on: version: description: "version" required: true - default: "v14" + default: "v15" jobs: build: @@ -15,7 +15,7 @@ jobs: image: alpine:latest env: VERSION: ${{ github.event.inputs.version }} - PUBLISH_PKG: github.com/shenzhencenter/google-ads-pb + PUBLISH_PKG: github.com/Optable/google-ads-pb INPUT_PATH: /googleapis OUTPUT_PATH: ~/go/src/google-ads-pb ADSLIB_PATH: /googleapis/google/ads/googleads/${{ github.event.inputs.version }} @@ -34,7 +34,7 @@ jobs: - name: Clone repositories run: | - git clone --branch=develop https://$GITHUB_ACTOR_ID:${{ secrets.GITHUB_TOKEN }}@github.com/shenzhencenter/google-ads-pb.git $OUTPUT_PATH + git clone --branch=develop https://$GITHUB_ACTOR_ID:${{ secrets.GITHUB_TOKEN }}@github.com/Optable/google-ads-pb.git $OUTPUT_PATH git clone --depth=1 --branch=master https://github.com/googleapis/googleapis.git $INPUT_PATH if [ ! -d $INPUT_PATH/google/protobuf ]; then git clone --depth=1 --branch=main https://github.com/protocolbuffers/protobuf.git /protobuf @@ -77,7 +77,7 @@ jobs: run: | cd $OUTPUT_PATH if [ ! -f go.mod ]; then - go mod init github.com/shenzhencenter/google-ads-pb + go mod init github.com/Optable/google-ads-pb fi go mod tidy go fmt ./... @@ -87,11 +87,15 @@ jobs: run: | cd $OUTPUT_PATH if [ -z "$(git status --porcelain)" ]; then - echo "==> No changes" + echo "==> No changes to commit" exit 0 fi - git add . - git config user.email "16268065+xnkjj@users.noreply.github.com" - git config user.name "GitHub Action" - git commit -m "feat: updated by action, $(date)" - git push origin develop + echo "==> Committing changes" + + git config user.name "GitHub Actions Bot" + git config user.email "<>" + + git add . + git commit -m "Auto-generated client update for version $VERSION" + git push origin HEAD:develop + echo "==> Changes have been pushed" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 45ba17a0..145d8fce 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: "1.20" + go-version: "1.21.0" - name: Build run: go mod tidy && go build -v ./...