fix: set the release please base version in the manifest (#476) #203
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 branch | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
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: Python | |
dev_docs_slug: python | |
template_file: ./README.template.md | |
output_file: ./README.md | |
release-please: | |
needs: [build] | |
runs-on: ubuntu-24.04 | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: googleapis/release-please-action@v4 | |
name: Release Please | |
id: release | |
with: | |
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }} | |
release-type: python | |
publish-python: | |
needs: [release-please] | |
if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
runs-on: ubuntu-24.04 | |
env: | |
VERSION: ${{ needs.release-please.outputs.tag_name }} | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Publish package | |
run: | | |
set -e | |
set -x | |
if [ -z "$VERSION" ] | |
then | |
echo "Unable to determine SDK version! Exiting!" | |
exit 1 | |
fi | |
echo "Going to publish version=$VERSION" |