Skip to content

Merge pull request #490 from team-monite/changeset-release/main #63

Merge pull request #490 from team-monite/changeset-release/main

Merge pull request #490 from team-monite/changeset-release/main #63

# Creates a "Version Packages" PR.
# Refer to the "changesets/action" documentation for more information: https://github.com/changesets/action
name: Version Packages
on:
push:
branches:
- main
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
versioning:
name: Calculate Changesets
runs-on: ubuntu-latest
if: github.repository == 'team-monite/monite-sdk'
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Changeset Config
run: .changeset/validate-changesets-base-branch.sh ${{ github.ref_name }}
- name: Setup Monorepo
uses: team-monite/setup-yarn-project-action@c098d54db6f34eb2103eb9cceda484984e8b9bbe
with:
# Do not use the cache if merged PR source branch starts with `changeset-release/`
cache: ${{ !startsWith(github.event.pull_request.head.ref, 'changeset-release/') }}
- name: Create Release Pull Request or Publish to NPM
id: changesets
uses: changesets/[email protected]
with:
version: yarn exec .changeset/version.sh
title: "chore: Version Packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}