Skip to content

package bump

package bump #4

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: npm pack
run: |
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
npm pack
cp ${REPO_NAME}*.tgz ${REPO_NAME}-latest.tgz
- uses: actions/upload-artifact@master
with:
name: artifact-tgz
path: |
./*.tgz
- name: Create Release
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.tgz
tag: ${{ github.ref }}
overwrite: true
file_glob: true
publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}