Skip to content

v2.2.5

v2.2.5 #9

Workflow file for this run

name: publish-release
on:
release:
types: [ released ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Pack tarball
id: pack_tarball
run: |
PACK_NAME=$(npm pack | tail -n 1)
echo "::set-output name=tar_filename::$PACK_NAME"
- name: Upload
uses: actions/upload-artifact@v2
with:
name: package
path: "*.tgz"
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload asset to github release page
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./${{ steps.pack_tarball.outputs.tar_filename }}
asset_name: ${{ steps.pack_tarball.outputs.tar_filename }}
asset_content_type: application/gzip