Skip to content

Commit 2a6f706

Browse files
ci(mono-pub): fix publishing job (#29)
1 parent 5eaa5c0 commit 2a6f706

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/nodejs.packages.publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
1921

2022
- name: Setup Node.js environment
2123
uses: actions/setup-node@v4

packages/mono-pub/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ To publish packages just run it from your CI/CD provider. For example, GitHub Ac
141141
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
142142
```
143143
144+
> **NOTE**: @mono-pub/git like semantic-release uses tags to define versions.
145+
> So make sure the tags are locally accessible when running the `publish` script.
146+
> You can achieve it by passing `fetch-depth: 0` to `actions/checkout` or by running `git fetch --tags` separately
147+
144148
And there's advanced example.
145149

146150
[`@mono-pub/github`](https://github.com/SavelevMatthew/mono-pub/tree/main/packages/github)

0 commit comments

Comments
 (0)