Skip to content

Commit 1e5b252

Browse files
committed
Release niceties
1 parent 25f477c commit 1e5b252

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ jobs:
2727
- name: Build
2828
run: npm run build
2929
- name: Create tar archive of dist
30-
run: tar -czf release.tar.gz dist
30+
run: |
31+
mkdir -p temp
32+
cp -r dist temp/pinhead-dist
33+
tar -czf pinhead-dist.tar.gz -C temp pinhead-dist
34+
- run: rm -rf temp
3135
- name: Create GitHub Release
3236
run: |
33-
gh release create "${GITHUB_REF_NAME}" release.tar.gz \
37+
gh release create "${GITHUB_REF_NAME}" pinhead-dist.tar.gz \
3438
--title "${GITHUB_REF_NAME}" \
3539
--generate-notes
3640
env:

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
"access": "public"
88
},
99
"scripts": {
10-
"build": "npm run check_icons && npm run build_icons",
11-
"build_icons": "node ./scripts/build_icons.js",
12-
"check_icons": "node ./scripts/check_icons.js",
13-
"serve": "node serve.js"
10+
"build": "npm run check_icons && npm run build_icons && npm run write_dist_meta",
11+
"build_icons": "node scripts/build_icons.js",
12+
"check_icons": "node scripts/check_icons.js",
13+
"serve": "node serve.js",
14+
"write_dist_meta": "cp LICENSE dist/LICENSE && node -p \"'Pinhead Map Icons version ' + require('./package.json').version + ' by Wayside Mapping. For more info and recent releases visit: https://github.com/waysidemapping/pinhead'\" > dist/README"
1415
},
1516
"devDependencies": {
1617
"chalk": "^5.2.0",

0 commit comments

Comments
 (0)