Skip to content

Publish eslint-remote-tester #14

Publish eslint-remote-tester

Publish eslint-remote-tester #14

name: Publish eslint-remote-tester
on:
workflow_dispatch:
inputs:
release-type:
type: choice
description: Type of the release
options:
- patch
- minor
- major
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install
run: pnpm install
- name: Build
run: pnpm build
# Fixes the "npm ERR! 404 Not Found - PUT https://registry.npmjs.org/eslint-remote-tester - Not found" issue
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Configure github-actions git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@users.noreply.github.com'
- name: Bump version
run: npm version ${{ github.event.inputs.release-type }}
working-directory: ./packages/eslint-remote-tester
- name: Push release tag
run: git push origin master --follow-tags
- name: Publish to npm
run: npm publish
working-directory: ./packages/eslint-remote-tester
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}