Skip to content

Commit cb6c739

Browse files
committed
💚 Fix publish with semantic-release.
1 parent 09bd790 commit cb6c739

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
@semantic-release/git
3535
@semantic-release/exec
3636
@semantic-release/github
37-
semantic-release-gitmoji
37+
semantic-release-gitmoji@1.5.0
3838
- name: Release package
3939
env:
4040
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

release.config.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { promisify } = require('util')
1+
const {promisify} = require('util')
22
const readFileAsync = promisify(require('fs').readFile)
33

44
const template = readFileAsync('.github/templates/template.hbs')
@@ -46,22 +46,23 @@ function makeGroups(commits) {
4646
if (!commits.length) return []
4747

4848
function mapCommits(groups) {
49-
return groups
50-
.map(({ group, emojis, label }) => ({
51-
group,
52-
label,
53-
is_dep: group === 'dependencies',
54-
commits: commits
55-
.filter((commit) => emojis.indexOf(commit.gitmoji) >= 0)
56-
.sort((first, second) => new Date(second.committerDate) - new Date(first.committerDate)),
57-
}))
58-
.filter(group => group.commits.length);
59-
}
49+
return groups
50+
.map(({group, emojis, label}) => ({
51+
group,
52+
label,
53+
is_dep: group === 'dependencies',
54+
commits: commits
55+
.filter((commit) => emojis.indexOf(commit.gitmoji) >= 0)
56+
.sort((first, second) => new Date(second.committerDate) - new Date(first.committerDate)),
57+
}))
58+
.filter(group => group.commits.length);
59+
}
6060

6161
return mapCommits(sections)
6262
}
63+
6364
module.exports = {
64-
branches: ["main", { name: "develop", prerelease: "rc" }],
65+
branches: ["main", {name: "develop", prerelease: "rc"}],
6566
tagFormat: "v${version}",
6667
plugins: [
6768
[
@@ -75,7 +76,7 @@ module.exports = {
7576
},
7677
releaseNotes: {
7778
template,
78-
partials: { commitTemplate },
79+
partials: {commitTemplate},
7980
helpers: {
8081
sections: (commits) => {
8182
let flat_commits = [];
@@ -99,7 +100,10 @@ module.exports = {
99100
[
100101
"@semantic-release/exec",
101102
{
102-
prepareCmd: "poetry version ${nextRelease.version} && poetry build",
103+
prepareCmd:
104+
"poetry version ${nextRelease.version} && " +
105+
"npm version --no-git-tag-version ${nextRelease.version} && " +
106+
"poetry build",
103107
publishCmd: "poetry publish",
104108
},
105109
],
@@ -117,7 +121,7 @@ module.exports = {
117121
[
118122
"@semantic-release/github",
119123
{
120-
assets: [{ path: "dist/*.whl" }, { path: "dist/*.tar.gz" }],
124+
assets: [{path: "dist/*.whl"}, {path: "dist/*.tar.gz"}],
121125
},
122126
],
123127
],

0 commit comments

Comments
 (0)