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

Ability to only github release in a monorepo #2346

Open
AlexandrosMelissas opened this issue Mar 22, 2023 · 0 comments
Open

Ability to only github release in a monorepo #2346

AlexandrosMelissas opened this issue Mar 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@AlexandrosMelissas
Copy link

Is your feature request related to a problem? Please describe.
I have a monorepo with turborepo, lerna (for releases) and auto. I only want to make git tags and releases with conventional commits and not publish in npm. So far, when i use only the "git-tag" and "conventional-commits" plugins and i use auto shipit in my github actions workflow, i only get versioning for the root e.x. v1.0.2 instead of app1@1.0.2, app2@1.0.2 etc.

I fixed that by using npm plugin with forcePublish: false and not using "git-tag" plugin and having private:true in all my package.json files. Now auto shipit properly uses lerna.json and tags independently as it should. The problem now is that it wont create the github releases (i guess because it wont publish anything to npm). Is there a way to create the github releases without publishing to npm?

Describe the solution you'd like

Maybe some sort of auto shipit --force-release ?

Describe alternative solutions

Make git-tag plugin work with monorepos.

Additional context

name: Release

on:
  push:
    branches:
      - main

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

jobs:
  release:
    name: Release
    if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v3
        with:
          fetch-depth: "0"
      - name: Setup Node.js 16
        uses: actions/setup-node@v3
        with:
          node-version: 16
      - uses: pnpm/action-setup@v2
        name: Install pnpm
        id: pnpm-install2
        with:
          version: 7
          run_install: false
      - name: Install dependencies
        run: pnpm install --frozen-lockfile
      - name: Trigger release
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: pnpm auto shipit

  "auto": {
    "plugins": [
      [
        "npm",
        {
          "forcePublish": false
        }
      ],
      [
        "conventional-commits",
        {
          "preset": "angular"
        }
      ],
    ]
  }
@AlexandrosMelissas AlexandrosMelissas added the enhancement New feature or request label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant