Skip to content

Commit e1078ef

Browse files
authored
fix(ci): Ensure the package.json file has the right publishing version. (#67)
Otherwise it tries to publish version 0.0.0
1 parent 163d51d commit e1078ef

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,18 @@ jobs:
8181
GITHUB_REF: ${{ github.ref }}
8282
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi
8383
- name: Create JS Artifact
84-
run: rm -rf dist/js && npx projen package:js && ls -la dist/js
84+
run: |
85+
rm -rf dist/js
86+
npx projen package:js
87+
ls -la dist/js
8588
- name: Release JS Artifact
8689
env:
8790
NPM_DIST_TAG: latest
8891
NPM_REGISTRY: registry.npmjs.org
8992
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
90-
run: npx -p publib@latest publib-npm
93+
run: |
94+
npx projen bump
95+
npx -p publib@latest publib-npm
9196
- name: Create Java Artifact
9297
run: npx projen package:java
9398
- name: Release Java Artifact

.npmignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ project.addBundledDeps('js-toml@^0.1.1');
4848
project.addGitIgnore('target');
4949
project.gitignore.removePatterns('*.tgz');
5050

51+
project.npmignore.exclude('examples');
52+
project.npmignore.exclude('cargolambdacdk');
53+
5154
const testTask = project.tasks.tryFind('test');
5255
if (testTask) {
5356
testTask.reset();

0 commit comments

Comments
 (0)