-
-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (42 loc) · 1.59 KB
/
publish-eslint-remote-tester.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}