Skip to content

Commit

Permalink
Add publish action, update year in license
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoDF committed Oct 20, 2024
1 parent 47b0d81 commit 3b69daa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2023 Hugo Di Francesco
Copyright (c) 2024 Hugo Di Francesco


Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Boilerplate repo with:
- Node, npm
- tests with the `node:test` built-in
- formatting with prettier
- GitHub Actions
- GitHub Actions on commit and to auto-publish on GH release
- **note**: for publish to work, `NPM_TOKEN` has to be set in the repository GH Actions secrets

## Requirements

Expand Down

0 comments on commit 3b69daa

Please sign in to comment.