Skip to content

Merge pull request #1 from rebelopsio/chore/add-workflows-and-update-… #1

Merge pull request #1 from rebelopsio/chore/add-workflows-and-update-…

Merge pull request #1 from rebelopsio/chore/add-workflows-and-update-… #1

name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Run Release Please
uses: googleapis/release-please-action@v4
id: release
with:
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
# Update the major version tag (e.g., v1) to point to the latest release.
# This is the standard convention for GitHub Actions so users can pin to v1.
- name: Update major version tag
if: ${{ steps.release.outputs.release_created }}
env:
TAG: ${{ steps.release.outputs.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
MAJOR=$(echo "$TAG" | cut -d. -f1)
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -fa "$MAJOR" -m "Update $MAJOR tag to $TAG"
git push origin "$MAJOR" --force