From 58165760e1475057fdaa2dea47571474554965b7 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Thu, 10 Jul 2025 14:03:25 -0700 Subject: [PATCH 01/11] Go release workflow --- .github/workflows/go-release.yml | 113 +++++++++++++++++++++++++++++++ releases/go/.git-cliff.toml | 21 ++++++ scripts/go-release-automation.sh | 107 +++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 .github/workflows/go-release.yml create mode 100644 releases/go/.git-cliff.toml create mode 100644 scripts/go-release-automation.sh diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml new file mode 100644 index 0000000000..e8df0f4c00 --- /dev/null +++ b/.github/workflows/go-release.yml @@ -0,0 +1,113 @@ +name: Go Release Automation + +on: + workflow_dispatch: + inputs: + project-name: + description: "Project name (e.g., DynamoDbEncryption)" + required: true + type: string + version: + description: "Version (e.g., v0.1.0)" + required: true + type: string + +jobs: + get-dafny-version: + uses: ./.github/workflows/dafny_version.yaml + + go-release: + needs: get-dafny-version + runs-on: macos-13 + permissions: + contents: write + pull-requests: write + id-token: write + + steps: + - name: Support longpaths on Git checkout + run: | + git config --global core.longpaths true + + # KMS and MPL tests need to use credentials which can call KMS + - name: Configure AWS Credentials for Tests + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2 + role-session-name: GoReleaseTest + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update submodules + run: | + git submodule update --init --recursive + + - name: Setup Dafny + uses: ./.github/actions/setup_dafny + with: + dafny-version: ${{ needs.get-dafny-version.outputs.version }} + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: "1.23" + + - name: Install Go imports + run: | + go install golang.org/x/tools/cmd/goimports@latest + + - name: Install Smithy-Dafny codegen dependencies + uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + + - name: Configure Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + - name: Get release directory name + id: release-dir + run: | + RELEASE_DIR_NAME=$(./scripts/go-release-automation.sh get_release_dir_name "${{ github.event.inputs.project-name }}" "${{ github.event.inputs.version }}") + echo "releaseDirName=$RELEASE_DIR_NAME" >> $GITHUB_OUTPUT + + - name: Generate a changelog + uses: orhun/git-cliff-action@v4 + with: + config: releases/go/.git-cliff.toml + args: --bump -u --prepend releases/go/${{ steps.release-dir.outputs.releaseDirName }}/CHANGELOG.md + + - name: Run Go release automation script + run: | + chmod +x ./scripts/go-release-automation.sh + ./scripts/go-release-automation.sh run_release_script ${{ github.event.inputs.project-name }} ${{ github.event.inputs.version }} + + - name: Create Pull Request + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PROJECT_NAME="${{ github.event.inputs.project-name }}" + VERSION="${{ github.event.inputs.version }}" + + # Get the release directory name using the sourced function + RELEASE_DIR_NAME="${{ steps.release-dir.outputs.releaseDirName }}" + + BRANCH_NAME="golang-release-staging-branch/$RELEASE_DIR_NAME/$VERSION" + + DIFF_FILES=$(diff -qr $PROJECT_NAME/runtimes/go/ImplementationFromDafny-go releases/go/$RELEASE_DIR_NAME || true) + + # Create PR using GitHub CLI + gh pr create \ + --title "chore(go): Release $RELEASE_DIR_NAME Go module $VERSION" \ + --body "This PR was automatically created by the Go Release Automation workflow. It releases version $VERSION of the $RELEASE_DIR_NAME Go module. The diff between $PROJECT_NAME/runtimes/go/ImplementationFromDafny-go and releases/go/$RELEASE_DIR_NAME is below: + + $DIFF_FILES + " \ + --base main \ + --head "$BRANCH_NAME" \ + --label "golang" \ + --draft \ No newline at end of file diff --git a/releases/go/.git-cliff.toml b/releases/go/.git-cliff.toml new file mode 100644 index 0000000000..8aa878a878 --- /dev/null +++ b/releases/go/.git-cliff.toml @@ -0,0 +1,21 @@ +[git] +tag_pattern = "^releases/go/mpl/v*" +filter_commits = true +commit_parsers = [ + { message = '^feat\((go|all languages)\)', group = "Features"}, + { message = '^fix\((go|all languages)\)', group = "Fixes"}, + { message = '^chore\((go|all languages)\)', group = "Maintenance"}, + { message = '^docs\((go|all languages)\)', group = "Maintenance"}, + { message = '^revert\((go|all languages)\)', group = "Fixes"}, + { message = '^style\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^refactor\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^perf\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^test\((go|all languages)\)', group = "Miscellaneous"}, +] +commit_preprocessors = [ + { pattern = '\(dafny\)', replace = '(all languages)'} +] + +[changelog] +header = "# Changelog\n\n" +trim = true \ No newline at end of file diff --git a/scripts/go-release-automation.sh b/scripts/go-release-automation.sh new file mode 100644 index 0000000000..dabc83b42b --- /dev/null +++ b/scripts/go-release-automation.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +# Go Release Process Script +# Used for copying go files to release directory and make a commit + +set -e # Exit on error + +# Check if project name and version is provided +if [ $# -ne 3 ]; then + echo "Usage: $0 [version]" + echo "Example: $0 get_release_dir_name DynamoDbEncryption v0.1.0" + echo "Example: $0 run_release_script DynamoDbEncryption v0.1.0" + exit 1 +fi + +# Function to map project name to release directory name +get_release_dir_name() { + local project=$1 + case "$project" in + "DynamoDbEncryption") echo "dynamodb-esdk" ;; + *) echo "Error: Unknown project name: $project" >&2; return 1 ;; + esac +} + +run_release_script() { + PROJECT_NAME=$1 + VERSION=$2 + + echo "Starting Go release script for $PROJECT_NAME $VERSION" + + # Pull the latest smithy-dafny and libraries git submodules + echo " Pulling latest git submodules..." + git submodule update --init --recursive + + # Go to the project directory + echo " Navigating to $PROJECT_NAME..." + cd "$PROJECT_NAME" || { echo "Error: Project directory $PROJECT_NAME not found"; exit 1; } + + # Build using make commands + echo " Building project..." + make polymorph_dafny + make polymorph_go + make transpile_go + make test_go + + # Run Go tools in ImplementationFromDafny-go + echo " Running Go tools in ImplementationFromDafny-go..." + cd runtimes/go/ImplementationFromDafny-go || { echo "Error: ImplementationFromDafny-go directory not found"; exit 1; } + + find . -name "*shim.go" -type f -delete + echo "Removed all shim.go files" + + echo "Running goimports..." + goimports -w . + + echo "Running go get -u..." + go get -u + + echo "Running go mod tidy..." + go mod tidy + + echo "Running go build to check for errors..." + go build --gcflags="-e" ./... + + # Replacement directives are removed to get package from go pkg instead of local copy + echo "Removing all replace directives from go.mod..." + go mod edit -json | jq -r '.Replace[].Old.Path' | xargs -n1 go mod edit -dropreplace + + # Get the mapped release directory name + RELEASE_DIR_NAME=$(get_release_dir_name "$PROJECT_NAME") + + # Copy files to releases directory + echo " Copying files to releases/go/$RELEASE_DIR_NAME..." + + # Use rsync to copy files while excluding following ones: + # ImplementationFromDafny.go: This file is for devlopment. Users is expected use API(s) from `*/api_client.go` + # ImplementationFromDafny-go.dtr: This is the dafny translation record only needed for code generation + # go.sum: This files will be updated by go mod tidy + rsync -av --exclude="ImplementationFromDafny.go" --exclude="ImplementationFromDafny-go.dtr" --exclude="go.sum" ./ "$(git rev-parse --show-toplevel)/releases/go/$RELEASE_DIR_NAME/" + + # Run Go tools in releases directory + echo "Running Go tools in releases/go/$RELEASE_DIR_NAME..." + + cd "$(git rev-parse --show-toplevel)/releases/go/$RELEASE_DIR_NAME/" || { echo "Error: releases directory not found"; exit 1; } + + echo "Running goimports..." + goimports -w . + echo "Running go get -u..." + go get -u ./... + + echo "Running go mod tidy..." + go mod tidy + + echo "Running go build to check for errors..." + go build --gcflags="-e" ./... + + # Prepare for commit + echo "creating a branch..." + +# git checkout -b "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" +# git add * + +# git commit -m "Release $RELEASE_DIR_NAME Go module ${VERSION}" +# git push origin "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" +} + +"$@" \ No newline at end of file From 61c61364fd9d482a098d3bdf2e4b23cdd6397a8b Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Thu, 10 Jul 2025 14:03:25 -0700 Subject: [PATCH 02/11] Go release workflow --- .github/workflows/go-release.yml | 113 +++++++++++++++++++++++++++++++ releases/go/.git-cliff.toml | 21 ++++++ scripts/go-release-automation.sh | 107 +++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 .github/workflows/go-release.yml create mode 100644 releases/go/.git-cliff.toml create mode 100644 scripts/go-release-automation.sh diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml new file mode 100644 index 0000000000..e8df0f4c00 --- /dev/null +++ b/.github/workflows/go-release.yml @@ -0,0 +1,113 @@ +name: Go Release Automation + +on: + workflow_dispatch: + inputs: + project-name: + description: "Project name (e.g., DynamoDbEncryption)" + required: true + type: string + version: + description: "Version (e.g., v0.1.0)" + required: true + type: string + +jobs: + get-dafny-version: + uses: ./.github/workflows/dafny_version.yaml + + go-release: + needs: get-dafny-version + runs-on: macos-13 + permissions: + contents: write + pull-requests: write + id-token: write + + steps: + - name: Support longpaths on Git checkout + run: | + git config --global core.longpaths true + + # KMS and MPL tests need to use credentials which can call KMS + - name: Configure AWS Credentials for Tests + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2 + role-session-name: GoReleaseTest + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update submodules + run: | + git submodule update --init --recursive + + - name: Setup Dafny + uses: ./.github/actions/setup_dafny + with: + dafny-version: ${{ needs.get-dafny-version.outputs.version }} + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: "1.23" + + - name: Install Go imports + run: | + go install golang.org/x/tools/cmd/goimports@latest + + - name: Install Smithy-Dafny codegen dependencies + uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + + - name: Configure Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + - name: Get release directory name + id: release-dir + run: | + RELEASE_DIR_NAME=$(./scripts/go-release-automation.sh get_release_dir_name "${{ github.event.inputs.project-name }}" "${{ github.event.inputs.version }}") + echo "releaseDirName=$RELEASE_DIR_NAME" >> $GITHUB_OUTPUT + + - name: Generate a changelog + uses: orhun/git-cliff-action@v4 + with: + config: releases/go/.git-cliff.toml + args: --bump -u --prepend releases/go/${{ steps.release-dir.outputs.releaseDirName }}/CHANGELOG.md + + - name: Run Go release automation script + run: | + chmod +x ./scripts/go-release-automation.sh + ./scripts/go-release-automation.sh run_release_script ${{ github.event.inputs.project-name }} ${{ github.event.inputs.version }} + + - name: Create Pull Request + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PROJECT_NAME="${{ github.event.inputs.project-name }}" + VERSION="${{ github.event.inputs.version }}" + + # Get the release directory name using the sourced function + RELEASE_DIR_NAME="${{ steps.release-dir.outputs.releaseDirName }}" + + BRANCH_NAME="golang-release-staging-branch/$RELEASE_DIR_NAME/$VERSION" + + DIFF_FILES=$(diff -qr $PROJECT_NAME/runtimes/go/ImplementationFromDafny-go releases/go/$RELEASE_DIR_NAME || true) + + # Create PR using GitHub CLI + gh pr create \ + --title "chore(go): Release $RELEASE_DIR_NAME Go module $VERSION" \ + --body "This PR was automatically created by the Go Release Automation workflow. It releases version $VERSION of the $RELEASE_DIR_NAME Go module. The diff between $PROJECT_NAME/runtimes/go/ImplementationFromDafny-go and releases/go/$RELEASE_DIR_NAME is below: + + $DIFF_FILES + " \ + --base main \ + --head "$BRANCH_NAME" \ + --label "golang" \ + --draft \ No newline at end of file diff --git a/releases/go/.git-cliff.toml b/releases/go/.git-cliff.toml new file mode 100644 index 0000000000..8aa878a878 --- /dev/null +++ b/releases/go/.git-cliff.toml @@ -0,0 +1,21 @@ +[git] +tag_pattern = "^releases/go/mpl/v*" +filter_commits = true +commit_parsers = [ + { message = '^feat\((go|all languages)\)', group = "Features"}, + { message = '^fix\((go|all languages)\)', group = "Fixes"}, + { message = '^chore\((go|all languages)\)', group = "Maintenance"}, + { message = '^docs\((go|all languages)\)', group = "Maintenance"}, + { message = '^revert\((go|all languages)\)', group = "Fixes"}, + { message = '^style\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^refactor\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^perf\((go|all languages)\)', group = "Miscellaneous"}, + { message = '^test\((go|all languages)\)', group = "Miscellaneous"}, +] +commit_preprocessors = [ + { pattern = '\(dafny\)', replace = '(all languages)'} +] + +[changelog] +header = "# Changelog\n\n" +trim = true \ No newline at end of file diff --git a/scripts/go-release-automation.sh b/scripts/go-release-automation.sh new file mode 100644 index 0000000000..dabc83b42b --- /dev/null +++ b/scripts/go-release-automation.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +# Go Release Process Script +# Used for copying go files to release directory and make a commit + +set -e # Exit on error + +# Check if project name and version is provided +if [ $# -ne 3 ]; then + echo "Usage: $0 [version]" + echo "Example: $0 get_release_dir_name DynamoDbEncryption v0.1.0" + echo "Example: $0 run_release_script DynamoDbEncryption v0.1.0" + exit 1 +fi + +# Function to map project name to release directory name +get_release_dir_name() { + local project=$1 + case "$project" in + "DynamoDbEncryption") echo "dynamodb-esdk" ;; + *) echo "Error: Unknown project name: $project" >&2; return 1 ;; + esac +} + +run_release_script() { + PROJECT_NAME=$1 + VERSION=$2 + + echo "Starting Go release script for $PROJECT_NAME $VERSION" + + # Pull the latest smithy-dafny and libraries git submodules + echo " Pulling latest git submodules..." + git submodule update --init --recursive + + # Go to the project directory + echo " Navigating to $PROJECT_NAME..." + cd "$PROJECT_NAME" || { echo "Error: Project directory $PROJECT_NAME not found"; exit 1; } + + # Build using make commands + echo " Building project..." + make polymorph_dafny + make polymorph_go + make transpile_go + make test_go + + # Run Go tools in ImplementationFromDafny-go + echo " Running Go tools in ImplementationFromDafny-go..." + cd runtimes/go/ImplementationFromDafny-go || { echo "Error: ImplementationFromDafny-go directory not found"; exit 1; } + + find . -name "*shim.go" -type f -delete + echo "Removed all shim.go files" + + echo "Running goimports..." + goimports -w . + + echo "Running go get -u..." + go get -u + + echo "Running go mod tidy..." + go mod tidy + + echo "Running go build to check for errors..." + go build --gcflags="-e" ./... + + # Replacement directives are removed to get package from go pkg instead of local copy + echo "Removing all replace directives from go.mod..." + go mod edit -json | jq -r '.Replace[].Old.Path' | xargs -n1 go mod edit -dropreplace + + # Get the mapped release directory name + RELEASE_DIR_NAME=$(get_release_dir_name "$PROJECT_NAME") + + # Copy files to releases directory + echo " Copying files to releases/go/$RELEASE_DIR_NAME..." + + # Use rsync to copy files while excluding following ones: + # ImplementationFromDafny.go: This file is for devlopment. Users is expected use API(s) from `*/api_client.go` + # ImplementationFromDafny-go.dtr: This is the dafny translation record only needed for code generation + # go.sum: This files will be updated by go mod tidy + rsync -av --exclude="ImplementationFromDafny.go" --exclude="ImplementationFromDafny-go.dtr" --exclude="go.sum" ./ "$(git rev-parse --show-toplevel)/releases/go/$RELEASE_DIR_NAME/" + + # Run Go tools in releases directory + echo "Running Go tools in releases/go/$RELEASE_DIR_NAME..." + + cd "$(git rev-parse --show-toplevel)/releases/go/$RELEASE_DIR_NAME/" || { echo "Error: releases directory not found"; exit 1; } + + echo "Running goimports..." + goimports -w . + echo "Running go get -u..." + go get -u ./... + + echo "Running go mod tidy..." + go mod tidy + + echo "Running go build to check for errors..." + go build --gcflags="-e" ./... + + # Prepare for commit + echo "creating a branch..." + +# git checkout -b "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" +# git add * + +# git commit -m "Release $RELEASE_DIR_NAME Go module ${VERSION}" +# git push origin "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" +} + +"$@" \ No newline at end of file From 35fc603c3bf3eaf043e3d409de939e8d8196ff1c Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 09:38:55 -0700 Subject: [PATCH 03/11] auto commit --- .github/workflows/go-release.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index e8df0f4c00..78d2599036 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -1,16 +1,16 @@ name: Go Release Automation on: - workflow_dispatch: - inputs: - project-name: - description: "Project name (e.g., DynamoDbEncryption)" - required: true - type: string - version: - description: "Version (e.g., v0.1.0)" - required: true - type: string + push: + # inputs: + # project-name: + # description: "Project name (e.g., DynamoDbEncryption)" + # required: true + # type: string + # version: + # description: "Version (e.g., v0.1.0)" + # required: true + # type: string jobs: get-dafny-version: @@ -30,12 +30,12 @@ jobs: git config --global core.longpaths true # KMS and MPL tests need to use credentials which can call KMS - - name: Configure AWS Credentials for Tests + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2 - role-session-name: GoReleaseTest + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2 + role-session-name: GoRelease-DBESDK-Tests - name: Checkout repository uses: actions/checkout@v4 From 8175588bdcd74afc6cf8d5793ba27252349e2465 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 09:41:08 -0700 Subject: [PATCH 04/11] auto commit --- .github/workflows/go-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 78d2599036..cc16d67ab3 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -2,6 +2,7 @@ name: Go Release Automation on: push: + - * # inputs: # project-name: # description: "Project name (e.g., DynamoDbEncryption)" From 472a26b43d5a25c118021570597679fa43000081 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 09:41:32 -0700 Subject: [PATCH 05/11] auto commit --- .github/workflows/go-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index cc16d67ab3..d2f45d17b8 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -15,7 +15,7 @@ on: jobs: get-dafny-version: - uses: ./.github/workflows/dafny_version.yaml + uses: ./.github/workflows/dafny_version.yml go-release: needs: get-dafny-version From e33ff3d2c19aefb20e6b17341b005b9e93851d27 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 09:46:15 -0700 Subject: [PATCH 06/11] auto commit --- .github/workflows/go-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index d2f45d17b8..911128eaaf 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -2,7 +2,8 @@ name: Go Release Automation on: push: - - * + branches: + - rishav/go-release # inputs: # project-name: # description: "Project name (e.g., DynamoDbEncryption)" From 4a274acf36c0be2e067ae87885b583df428086e1 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 09:47:04 -0700 Subject: [PATCH 07/11] auto commit --- .github/workflows/go-release.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 911128eaaf..38d461ddb2 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -1,18 +1,16 @@ name: Go Release Automation on: - push: - branches: - - rishav/go-release - # inputs: - # project-name: - # description: "Project name (e.g., DynamoDbEncryption)" - # required: true - # type: string - # version: - # description: "Version (e.g., v0.1.0)" - # required: true - # type: string + workflow_dispatch: + inputs: + project-name: + description: "Project name (e.g., DynamoDbEncryption)" + required: true + type: string + version: + description: "Version (e.g., v0.1.0)" + required: true + type: string jobs: get-dafny-version: From ddb1232bab35d87a36de4498c019be32dc0ae069 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 10:23:52 -0700 Subject: [PATCH 08/11] auto commit --- .github/workflows/go-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 38d461ddb2..f028656060 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -48,7 +48,7 @@ jobs: git submodule update --init --recursive - name: Setup Dafny - uses: ./.github/actions/setup_dafny + uses: dafny-lang/setup-dafny-action@v1.8.0 with: dafny-version: ${{ needs.get-dafny-version.outputs.version }} From 747ef0fa20eb73d002d963b5808a5f0c37903daa Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 10:41:36 -0700 Subject: [PATCH 09/11] auto commit --- .github/workflows/go-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index f028656060..5f6b219883 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -72,6 +72,7 @@ jobs: - name: Get release directory name id: release-dir run: | + chmod +x ./scripts/go-release-automation.sh RELEASE_DIR_NAME=$(./scripts/go-release-automation.sh get_release_dir_name "${{ github.event.inputs.project-name }}" "${{ github.event.inputs.version }}") echo "releaseDirName=$RELEASE_DIR_NAME" >> $GITHUB_OUTPUT From 6e46dca56b58cab1db5c20fbc1770a3bd5589a9a Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 11:19:48 -0700 Subject: [PATCH 10/11] auto commit --- scripts/go-release-automation.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/go-release-automation.sh b/scripts/go-release-automation.sh index dabc83b42b..4e105550f8 100644 --- a/scripts/go-release-automation.sh +++ b/scripts/go-release-automation.sh @@ -97,11 +97,11 @@ run_release_script() { # Prepare for commit echo "creating a branch..." -# git checkout -b "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" -# git add * + git checkout -b "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" + git add * -# git commit -m "Release $RELEASE_DIR_NAME Go module ${VERSION}" -# git push origin "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" + git commit -m "Release $RELEASE_DIR_NAME Go module ${VERSION}" + git push origin "golang-release-staging-branch/$RELEASE_DIR_NAME/${VERSION}" } "$@" \ No newline at end of file From 210862b993669008844a3c03a7bedc1889aeaf8b Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 11 Jul 2025 13:00:34 -0700 Subject: [PATCH 11/11] formatting --- .github/workflows/go-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index 5f6b219883..b563a7f892 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -111,4 +111,4 @@ jobs: --base main \ --head "$BRANCH_NAME" \ --label "golang" \ - --draft \ No newline at end of file + --draft