Skip to content

Merge pull request #65 from aj3sh/constructor-refactor #4

Merge pull request #65 from aj3sh/constructor-refactor

Merge pull request #65 from aj3sh/constructor-refactor #4

Workflow file for this run

# Creates a Github release and NPM publish after the merge of
# release PR created by release-pr.yml
name: 'Release'
on:
push:
branches:
- main
permissions: {}
jobs:
release-please:
permissions:
contents: write # to create release commit (google-github-actions/release-please-action)
pull-requests: write # to create release PR (google-github-actions/release-please-action)
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: github-release
release-type: node
package-name: nepali-datetime
# The logic below handles the npm publication:
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- name: Install Dependencies
run: npm ci
if: ${{ steps.release.outputs.release_created }}
- name: Build
run: npm run build
if: ${{ steps.release.outputs.release_created }}
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}