Skip to content

Commit

Permalink
ci: add NPM package publication workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-soubeyrand committed Jun 7, 2024
1 parent 6b8c64f commit 71eac55
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Publish NPM package'

on:
release:
types:
- 'published'

jobs:
publish:
name: 'Publish'
runs-on: 'ubuntu-22.04'

permissions:
contents: 'read'
packages: 'write'

steps:
- name: 'Check out repository'
id: 'checkout'
uses: 'actions/checkout@v4'

- name: 'Set up Node.js'
id: 'setup-node'
uses: 'actions/setup-node@v4'
with:
registry-url: 'https://npm.pkg.github.com'
cache: 'npm'

- name: 'Run npm clean-install'
id: 'run-npm-clean-install'
run: |
npm clean-install
- name: 'Run npm publish'
id: 'run-npm-publish'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm publish --access 'public'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "reveal.js",
"name": "@camptocamp/reveal.js",
"version": "5.1.0",
"description": "The HTML Presentation Framework",
"homepage": "https://revealjs.com",
Expand All @@ -19,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/hakimel/reveal.js.git"
"url": "git://github.com/camptocamp/reveal.js.git"
},
"engines": {
"node": ">=18.0.0"
Expand Down

0 comments on commit 71eac55

Please sign in to comment.