Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version on minor, publish on patch #213

Open
jimmynXD opened this issue Sep 8, 2022 · 0 comments
Open

Version on minor, publish on patch #213

jimmynXD opened this issue Sep 8, 2022 · 0 comments

Comments

@jimmynXD
Copy link

jimmynXD commented Sep 8, 2022

Im trying to be more methodical with release, with patch being immediately released and everything else to only bump version and merge. Summary of what I'm looking to accomplish:

  • When a minor bump is detected in a PR, I want it to only do the version
  • When a patch bump is detected, I want it to version and publish

my release action is:

name: Release

on:
  workflow_dispatch:
  push:
    branches:
      - dev

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repo
        uses: actions/checkout@v3

      - name: Setup Node.js 16
        uses: actions/setup-node@v3
        with:
          node-version: 16

      - name: Setup pnpm
        uses: pnpm/action-setup@v2
        with:
          version: 7

      - name: Install Dependencies
        run: pnpm install --no-frozen-lockfile

      - name: Create Release Pull Request
        uses: changesets/[email protected]
        with:
          # commit: "release(auto): new package release"
          # title: "release(auto): new package release"
          commit: "chore(auto): new package version only"
          title: "chore(auto): new package version only"
          version: pnpm changeset version
          # publish: pnpm changeset publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # NPM_TOKEN: ${{ secrets._NPM_TOKEN }}

I'm going to test out using hasChangeset but that will only detect if a changeset is present, not the type of bump it is. Any takers on this?

my repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant