Release 2.4.0 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Setup Node π¦ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: Install dependencies π¨π»βπ» | |
run: npm ci | |
- name: Build π¨ | |
run: npm run build | |
- name: Upload artifacts 𧩠| |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-files | |
path: dist/ | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Download artifacts 𧩠| |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-files | |
path: dist/ | |
- name: Create release draft ποΈ | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: | | |
dist/PdNaja.esm.js | |
dist/PdNaja.esm.js.map | |
publishPublic: | |
name: Publish (public) | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Download artifacts 𧩠| |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-files | |
path: dist/ | |
- name: Setup Node π¦ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
registry-url: 'https://registry.npmjs.org' | |
- name: Publish release ποΈ | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
publishPrivate: | |
name: Publish (private) | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Download artifacts 𧩠| |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-files | |
path: dist/ | |
- name: Setup Node π¦ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Publish release ποΈ | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |