Publish to npm #8
Workflow file for this run
This file contains hidden or 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 npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Perl and App::FatPacker | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y perl cpanminus | |
| cpanm --local-lib=~/perl5 App::FatPacker | |
| echo "PATH=$HOME/perl5/bin:$PATH" >> $GITHUB_ENV | |
| echo "PERL5LIB=$HOME/perl5/lib/perl5:$PERL5LIB" >> $GITHUB_ENV | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install and Build | |
| run: | | |
| npm run build | |
| - name: Publish to npm | |
| run: | | |
| npm publish --provenance --access public --registry https://registry.npmjs.org/ |