Skip to content

chore(go): add Go release workflow #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a33ef8d
auto commit
rishav-karanjit Jul 17, 2025
a3303aa
auto commit
rishav-karanjit Jul 22, 2025
34191df
auto commit
rishav-karanjit Jul 22, 2025
8b1b50d
auto commit
rishav-karanjit Jul 22, 2025
ba0278e
auto commit
rishav-karanjit Jul 22, 2025
121bb63
auto commit
rishav-karanjit Jul 22, 2025
a5de953
auto commit
rishav-karanjit Jul 22, 2025
17f4391
Merge branch 'mainline' into rishav/releaseScript
rishav-karanjit Jul 22, 2025
dc8148c
auto commit
rishav-karanjit Jul 22, 2025
2aa6b79
Merge branch 'rishav/releaseScript' of https://github.com/aws/aws-enc…
rishav-karanjit Jul 22, 2025
c286938
auto commit
rishav-karanjit Jul 24, 2025
3d8b53a
Merge branch 'mainline' into rishav/releaseScript
rishav-karanjit Jul 24, 2025
bda38cc
auto commit
rishav-karanjit Jul 24, 2025
5ce2fd5
Update scripts/go-release-automation.sh
rishav-karanjit Jul 24, 2025
a3283aa
auto commit
rishav-karanjit Aug 4, 2025
5f61571
auto commit
rishav-karanjit Aug 4, 2025
7acd6e8
bump mpl
rishav-karanjit Aug 11, 2025
cbc1fd8
Merge branch 'mainline' into rishav/releaseScript
rishav-karanjit Aug 11, 2025
2cd5321
auto commit
rishav-karanjit Aug 11, 2025
dd2aba1
Merge branch 'rishav/releaseScript' of https://github.com/aws/aws-enc…
rishav-karanjit Aug 11, 2025
027cecd
Update go-release.yml
rishav-karanjit Aug 12, 2025
5d2ab3b
Update project.properties
rishav-karanjit Aug 12, 2025
2141441
auto commit
rishav-karanjit Aug 12, 2025
1732e95
formatting
rishav-karanjit Aug 12, 2025
ca235ca
bump mpl
rishav-karanjit Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Go Release Automation

on:
workflow_dispatch:
inputs:
project-name:
description: "Project name (e.g., AwsEncryptionSDK)"
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

- 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-Public-ESDK-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: ./mpl/.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 "[email protected]"

- name: Get release directory name
id: release-dir
run: |
chmod +x mpl/scripts/go-release-automation.sh
RELEASE_DIR_NAME=$(mpl/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: |
mpl/scripts/go-release-automation.sh run_release_script ${{ github.event.inputs.project-name }} ${{ github.event.inputs.version }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/aws/aws-encryption-sdk/releases/go/encryption-sdk
go 1.23.0

replace (
github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl => ../../../../../mpl/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/
github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl => ../../../../mpl/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/
github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb => ../../../../mpl/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/
github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms => ../../../../mpl/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/
github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives => ../../../../mpl/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/
Expand Down
2 changes: 1 addition & 1 deletion mpl
Submodule mpl updated from ec013f to 952c42
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dafnyVersion=4.9.0
dafnyVerifyVersion=4.9.0
dafnyFormatVersion=4.9.0
projectJavaVersion=4.1.0
mplDependencyJavaVersion=1.11.0-SNAPSHOT
mplDependencyJavaVersion=1.11.1-SNAPSHOT
dafnyRuntimeJavaVersion=4.9.0
smithyDafnyJavaConversionVersion=0.1.1
Loading