chore(deps-dev): bump rollup from 4.27.2 to 4.27.4 (#201) #79
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: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
release-check: | |
name: Check if version changed | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Use Node.js from nvmrc | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Check if version has been updated | |
id: check | |
uses: EndBug/version-check@v2 | |
outputs: | |
publish: ${{ steps.check.outputs.changed }} | |
release: | |
name: Release | |
needs: release-check | |
if: ${{ needs.release-check.outputs.publish == 'true' }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Use Node.js from nvmrc | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Get version | |
id: package-version | |
uses: martinbeentjes/[email protected] | |
- name: Install & build | |
run: | | |
npm ci | |
npm run build-dist | |
- name: Publish NPM package | |
run: | | |
npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} | |
- name: Tag commit and push | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ steps.package-version.outputs.current-version }} | |
- name: Create GitHub Release | |
id: create_regular_release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.tag_version.outputs.new_tag }} | |
body: 'Changes since last release:\n ${{ steps.tag_version.outputs.changelog }}' | |
allowUpdates: true | |
draft: false | |
prerelease: false | |
- name: Build the Docs | |
run: | | |
npm run docs | |
- name: Publish the docs | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs | |
commit_message: 'deploy docs: ${{ steps.tag_version.outputs.new_tag }}' |