Skip to content

chore(main): release momento 0.5.0 (#178) #83

chore(main): release momento 0.5.0 (#178)

chore(main): release momento 0.5.0 (#178) #83

name: release-please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }}
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Set up Ruby
if: ${{ steps.release.outputs.release_created }}
uses: ruby/setup-ruby@v1
- name: Configure Git user for redundant tag
run: |
git config --local user.email "[email protected]"
git config --local user.name "DevEco Engineers"
- name: Publish to Rubygems
uses: cadwallion/publish-rubygems-action@master
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_PUBLISH_TOKEN}}
RELEASE_COMMAND: bundle exec rake release
- name: Check for changes after publish
if: failure()
run: |
echo "Checking for changes in the staging area:"
git diff-index --cached HEAD
echo "Checking for changes in the working directory:"
git diff
- name: Upload artifacts to the GitHub Actions Run
uses: actions/upload-artifact@v4
if: ${{ steps.release.outputs.release_created }}
with:
name: gemfiles-v${{ needs.get_version.outputs.version }}
path: |
pkg/*.gem