Support custom headers #25
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 | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- "20" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install dependencies | |
run: npm i | |
- name: Lint code | |
run: npm run lint | |
- name: Add NPM token | |
if: github.ref == 'refs/heads/main' | |
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Build and Publish | |
if: github.ref == 'refs/heads/main' | |
run: npx @lets/publish |