Skip to content

Merge pull request #17 from AdaSupport/hcoles/bump_package_version #6

Merge pull request #17 from AdaSupport/hcoles/bump_package_version

Merge pull request #17 from AdaSupport/hcoles/bump_package_version #6

Workflow file for this run

name: NPM publish
on:
push:
branches:
- main
env:
NODE_VERSION: 20
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # allow GITHUB_TOKEN to publish packages
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: "https://npm.pkg.github.com"
outputs:
type: ${{ steps.publish.outputs.type }}
create-release:
runs-on: ubuntu-latest
needs: publish
if: needs.publish.outputs.type
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Get package version"
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: "Create release"
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.package-version.outputs.current-version }}
commit: "main"
generateReleaseNotes: true