Skip to content

chore(release): v3.2.2 #129

chore(release): v3.2.2

chore(release): v3.2.2 #129

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0
- name: Fetching tags
run: git fetch --tags -f || true
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Setup npm cache
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci || npm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish in NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate Changelog
id: generate_changelog
run: |
changelog=$(npm run changelog:last --silent)
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "${changelog}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: meeDamian/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
commitish: ${{ github.sha }}
name: ${{ github.ref_name }}
body: ${{ steps.generate_changelog.outputs.changelog }}
draft: false
prerelease: false
files: >
dist/wppconnect-wa.js
gzip: folders
allow_override: true
- name: Update WPPConnect Site
run: gh workflow run update-blog.yml --repo wppconnect-team/wppconnect-team.github.io
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}