Skip to content

1.4.3

1.4.3 #21

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
- '!v**-beta.*'
jobs:
deploy:
name: Deploy a release on GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Parse release info
env:
LOG_DIR: logs
run: |
filename="${{ env.LOG_DIR }}/${{ github.ref_name }}.md"
echo "RELEASE_NAME=$(head -n 1 $filename)" >> $GITHUB_ENV
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$(tail -n +2 $filename)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Deploy a release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.RELEASE_NAME }}
body: |
${{ env.RELEASE_BODY }}
draft: false
prerelease: false
publish:
needs: deploy
name: Publish packages on npm.js
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
- name: Publish on npm.js
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}