Skip to content

chore(main): release 1.1.0 (#26) #15

chore(main): release 1.1.0 (#26)

chore(main): release 1.1.0 (#26) #15

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch: # Allows to run this workflow manually from the Actions tab on GitHub.
inputs:
version:
description: Manual version release e.g. 1.4.9
env:
NODE_VERSION: 18
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
release-type: node
release-as: ${{ github.event.inputs.version }}
outputs:
release_created: ${{ steps.release.outputs.release_created }}
publish-npm:
needs:
- release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main # needs to be explicitly set to pull the latest changes
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Create build
run: npm run build
- name: Publish
run: npm publish --ignore-scripts --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}