Merge pull request #95 from morganstanley/dependabot/github_actions/g… #24
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: Create Release | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: '16.x' | |
- name: Install node modules and verify build | |
run: npm ci && npm run build-release | |
- name: Release | |
if: github.repository == 'morganstanley/needle' | |
uses: justincy/github-action-npm-release@f6afd60cbb595a76ecae037ad006671636d321f5 # 2.0.2 | |
id: release | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
- name: Print release output | |
if: ${{ steps.release.outputs.released == 'true' }} | |
run: echo Release ID ${{ steps.release.outputs.release_id }} | |
- name: Publish | |
if: steps.release.outputs.released == 'true' | |
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} |