chore: release 1.28.6 (#545) #565
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On push to main | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
readme: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }} | |
- name: Generate README | |
uses: momentohq/standards-and-practices/github-actions/generate-and-commit-oss-readme@gh-actions-v2 | |
with: | |
project_status: official | |
project_stability: stable | |
project_type: sdk | |
sdk_language: Go | |
template_file: ./README.template.md | |
output_file: ./README.md | |
dev_docs_slug: go | |
- name: Generate CONTRIBUTING | |
uses: momentohq/standards-and-practices/github-actions/generate-and-commit-oss-readme@gh-actions-v2 | |
with: | |
project_status: official | |
project_stability: stable | |
project_type: other | |
sdk_language: Go | |
template_file: ./CONTRIBUTING.template.md | |
output_file: ./CONTRIBUTING.md | |
dev_docs_slug: go | |
test: | |
runs-on: ubuntu-24.04 | |
needs: [ readme ] | |
permissions: | |
contents: read | |
pull-requests: read | |
env: | |
MOMENTO_API_KEY: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- name: Install devtools | |
run: make install-devtools | |
- name: Lint | |
run: make lint | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
only-new-issues: true | |
skip-pkg-cache: true | |
# If there are any diffs from goimports or go mod tidy, fail. | |
- name: Verify no changes from goimports and go mod tidy | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git diff | |
exit 1 | |
fi | |
- name: Build | |
run: make build | |
- name: Build examples | |
run: make build-examples | |
- name: Run test | |
run: make prod-test | |
release-please: | |
runs-on: ubuntu-latest | |
needs: [ test ] | |
name: Release Please | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }} | |
release-type: go | |
package-name: momento | |
default-branch: main | |
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' | |
extra-files: | | |
internal/metadata.go | |
publish-golang: | |
needs: [ release-please ] | |
if: needs.release-please.outputs.release_created == 'true' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v3 | |
- name: Publish package | |
run: | | |
set -e | |
set -x | |
export MOMENTO_SDK_VERSION="${{needs.release-please.outputs.tag_name}}" | |
if [ -z "$MOMENTO_SDK_VERSION" ] | |
then | |
echo "Unable to determine SDK version! Exiting!" | |
exit 1 | |
fi | |
echo "MOMENTO_SDK_VERSION=${MOMENTO_SDK_VERSION}" | |
GOPROXY=proxy.golang.org go list -m github.com/momentohq/client-sdk-go@${MOMENTO_SDK_VERSION} | |
shell: bash |