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
16 changes: 8 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x # Run with latest stable Deno.

- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 22
node-version: "22.x"
registry-url: "https://registry.npmjs.org"

- name: Build package
- name: npm build
run: deno run -A ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}

- name: Publish package
- name: npm publish
if: startsWith(github.ref, 'refs/tags/')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ package using a local path:
```sh
npm install path/to/com-plain-date/npm
```

## Troubleshooting

If publishing to npm gives 404 errors, check that `NPM_TOKEN` is not expired at
<https://www.npmjs.com/settings/bjuppa/tokens> and set properly at
<https://github.com/bjuppa/com-plain-date/settings/secrets/actions>.