semantic-release not updating package.json in a mono repo #2629
-
Hello! Hope everyone is doing well on this Friday. Let us jump into it! We have a mono repo setup that uses error: Run pnpm run publish:packages
> @org/app publish:packages /home/runner/work/
> pnpm publish --filter ./packages/*
ERR_PNPM_GIT_UNCLEAN Unclean working tree. Commit or stash changes first.
If you want to disable Git checks on publish, set the "git-checks" setting to "false", or run again with "--no-git-checks".
ELIFECYCLE Command failed with exit code 1.
Error: Process completed with exit code 1. Heres my branches:
- master
debug: false
ci: true
plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator'
- - '@semantic-release/git'
- assets:
- dist/**/*.{js,css}
- docs
- package.json
message: |-
chore(release): ${nextRelease.version} [skip ci]
${nextRelease.notes}
- - '@semantic-release/github'
- addReleases: top
extends: 'semantic-release-monorepo' and here is my github actions for releasing and publishing name: Publish on github packages
on:
push:
branches:
- master
env:
CI: true
NODE_VERSION: 14
jobs:
build:
name: '🧙 Build & Setup'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Use Node.JS ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
cache: 'pnpm'
- name: Setup NPMRC
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GH_USER_TOKEN}}" >> .npmrc
echo "@someregistry:registry=https://npm.pkg.github.com" >> .npmrc
- name: Install Dependencies
run: pnpm install
- name: Build packages
run: pnpm build
semantic-release:
name: '📦 Release'
runs-on: ubuntu-latest
needs: build
permissions: write-all
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{secrets.GH_USER_TOKEN}}
persist-credentials: false
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Use Node.JS ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
cache: 'pnpm'
- name: Setup NPMRC
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.GH_USER_TOKEN}}" >> .npmrc
echo "@someregistry:registry=https://npm.pkg.github.com" >> .npmrc
- name: Install Dependencies
run: pnpm install
- name: Run Semantic Release
run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN}}
- name: Publish
run: pnpm run publish:packages
# release
pnpm -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo
# publish
pnpm publish --filter ./packages/* In the end, can't publish because commits to packages were not made it seems, unless I've done this completley wrong. Been at this issue for a week now and I'm at my witts end because I have a smaller mono-repo where I tested the results first before making it in our main repository and it works. Much appriciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sometimes you are the god coder, other times you are a moron. My All that precious time... At Least I learned alot about |
Beta Was this translation helpful? Give feedback.
Sometimes you are the god coder, other times you are a moron.
My
.releaserc.yml
was actually namedreleaserc.yml
All that precious time... At Least I learned alot about
semantic-release