Skip to content

Publish eslint-remote-tester #17

Publish eslint-remote-tester

Publish eslint-remote-tester #17

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
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-and-cache
- 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
working-directory: ./packages/eslint-remote-tester
run: |
mkdir .git
npm version ${{ github.event.inputs.release-type }}
- name: Push release tag
run: git push origin master --follow-tags
- name: Publish to npm
run: npm publish --provenance
working-directory: ./packages/eslint-remote-tester
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}