chore: remove Storybook AWS deployment workflow #8
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: Auto release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| name: Bump version and tag | |
| runs-on: ubuntu-22.04 | |
| if: "!startsWith(github.event.head_commit.message, 'chore: release v')" | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.RELEASE_PAT }} | |
| - name: Determine next version | |
| id: next | |
| run: | | |
| current=$(node -p "require('./package.json').version") | |
| IFS='.' read -r major minor patch <<< "$current" | |
| next_patch=$((patch + 1)) | |
| # Skip past any tags that already exist | |
| while git tag -l "v${major}.${minor}.${next_patch}" | grep -q .; do | |
| next_patch=$((next_patch + 1)) | |
| done | |
| echo "version=${major}.${minor}.${next_patch}" >> "$GITHUB_OUTPUT" | |
| - name: Update package.json version | |
| run: npm version ${{ steps.next.outputs.version }} --no-git-tag-version | |
| - name: Commit version bump | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add package.json | |
| git commit -m "chore: release v${{ steps.next.outputs.version }}" | |
| git push origin main | |
| - name: Create GitHub release (creates the tag) | |
| env: | |
| GH_TOKEN: ${{ secrets.RELEASE_PAT }} | |
| run: | | |
| gh release create "v${{ steps.next.outputs.version }}" \ | |
| --target main \ | |
| --title "v${{ steps.next.outputs.version }}" \ | |
| --generate-notes |