Skip to content

Commit de31ff6

Browse files
Fix release script
1 parent 22ef9fe commit de31ff6

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: latest
2732

2833
- name: Get bundle version
2934
run: |
@@ -36,7 +41,7 @@ jobs:
3641
run: zip -r $filename ./*
3742

3843
- name: Generate changelog
39-
run: node --experimental-strip-types ./bin/generateChangelog.ts -w
44+
run: pnpm run generate-changelog -w
4045

4146
- name: Publish release to GitHub
4247
run: gh release create $VERSION "./icons/$filename" -F CHANGELOG.md -t "ProIcons v$VERSION" -d=${{ inputs.draft }}

bin/generateChangelog.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ import pkg from '../package.json' with { type: 'json' }
55
import { kebabCase } from './helpers/rename.ts'
66
const { version } = pkg
77

8-
const shouldWrite = process.argv.includes('--write') || process.argv.includes('-w')
8+
const shouldWrite = process.argv.includes('-w') || process.argv.includes('--write')
99
const __rootdir = resolve(import.meta.dirname, '../')
1010

1111
export function generateChangelog() {
1212
const newIcons = []
1313
const updatedIcons = []
1414
const renamedIcons = []
1515

16-
for (const { name, added, updated } of lockfile.icons) {
16+
//@ts-ignore
17+
for (const [name, { added, updated }] of Object.entries(lockfile.icons)) {
1718
if (added == version) {
1819
newIcons.push(name)
1920
} else if (updated == version) {

0 commit comments

Comments
 (0)