Skip to content

[npm publish] remove environment from publish job #17

[npm publish] remove environment from publish job

[npm publish] remove environment from publish job #17

Workflow file for this run

name: NPM publish
on:
pull_request:
types: [ closed ]
branches: ['develop']
jobs:
version-bump:
name: 'Bump version and commit package.json'
runs-on: ubuntu-latest
environment: production
if: github.event.pull_request.merged == true
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v4'
with:
token: ${{ secrets.BOT_USER_TOKEN }}
ref: 'develop'
- name: 'Automated Version Bump'
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.BOT_USER_TOKEN }}
with:
patch-wording: '[npm release]'
tag-prefix: 'v'
target-branch: 'develop'
npm-publish:
name: 'npm publish'
needs: version-bump
if: startsWith(github.event.pull_request.title, '[npm publish]')
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v4'
with:
ref: develop
- name: 'Show current version'
run: grep '"version"' package.json
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20.x'
always-auth: true
scope: '@openbeta'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm@11
- name: NPM publish
run: yarn install --no-progress && yarn lint && yarn test && yarn build && npm publish --provenance --access public