chore: add eslint file extension rule (#82) #9
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: Publish to latest Tag | |
on: | |
push: | |
branches: | |
- main | |
- v1.x | |
jobs: | |
run-publish: | |
name: Run publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
actions: write | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: "yarn" | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install yarn dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
- name: Publish | |
run: | | |
VERSION=$(node -p "require('./package.json').version" ) | |
if [[ "$VERSION" =~ (rc) ]]; then | |
yarn publish:rc | |
else | |
yarn publish:latest | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |