Skip to content

Commit

Permalink
Add publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
e-adrien committed Dec 9, 2024
1 parent 2a09558 commit ae285f5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gh-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Package to GitHub Packages

on:
release:
types: [created]

jobs:
publish:
name: Publish Package to GitHub Packages
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://npm.pkg.github.com"
scope: "@lesjoursfr"

- run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: npm run build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Package to npmjs

on:
release:
types: [created]

jobs:
publish:
name: Publish Package to npmjs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"

- run: npm install

- run: npm run build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_LESJOURS_TOKEN }}

0 comments on commit ae285f5

Please sign in to comment.