Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:
inputs:
tag:
description: "Release tag to publish to npm, e.g. apps-script-utils-v3.0.0"
description: "Release tag to publish to npm, e.g. v3.0.0"
required: true

# Every job declares only the permissions it needs.
Expand Down Expand Up @@ -86,10 +86,18 @@ jobs:
id: pack
run: echo "file=$(npm pack --silent | tail -n 1)" >> "$GITHUB_OUTPUT"

# Skipped when this version is already on npm (for example the first release of a new
# package name, published by hand); the tarball still goes to the GitHub release.
- name: publish
env:
FILE: ${{ steps.pack.outputs.file }}
run: npm publish "./$FILE" --provenance --access public
run: |
spec="$(node -p "require('./package.json').name + '@' + require('./package.json').version")"
if npm view "$spec" version > /dev/null 2>&1; then
echo "$spec is already on npm, not published again"
else
npm publish "./$FILE" --provenance --access public
fi

- name: keep-package
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
Expand Down
7 changes: 4 additions & 3 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
".": {
"release-type": "node",
"package-name": "@bootgs/utils",
"component": "apps-script-utils",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"docs/writerside/writerside.cfg",
"docs/writerside-ru/writerside.cfg",
"docs/writerside-uk/writerside.cfg",
"docs/writerside-de/writerside.cfg",
"docs/writerside-fr/writerside.cfg"
]
],
"include-component-in-tag": false
}
}
},
"last-release-sha": "629b147f411517993c1073b8ae0fa784726e2348"
}
Loading