Merge pull request #56 from state-machines/chore/cleanup #23
This file contains hidden or 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: release-please | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| - name: Checkout | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: actions/checkout@v4 | |
| - name: Update COSS version | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| VERSION=$(grep "VERSION = " lib/state_machines/integrations/active_model/version.rb | sed "s/.*'\(.*\)'.*/\1/") | |
| sed -i "s/^version = .*/version = \"$VERSION\"/" coss.toml | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add coss.toml | |
| if ! git diff --cached --quiet; then | |
| git commit -m "chore: update COSS version to $VERSION" | |
| git push | |
| fi | |