Version 6.5.3 #129
Workflow file for this run
This file contains 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: Node.js Package | |
on: | |
release: | |
branches: | |
- master | |
- 5.x | |
types: [published] | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org/ | |
- run: npm install | |
- run: npm run build | |
- run: node publish.js | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
PRE_RELEASE: ${{github.event.release.prerelease}} | |
update-bug-report: | |
runs-on: ubuntu-24.04 | |
# wait for publishing to complete | |
needs: publish-npm | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- run: npm ci | |
- name: Latest major version for bug report update | |
id: major | |
uses: actions/github-script@v6 | |
with: | |
result-encoding: string | |
script: | | |
const fs = require('fs-extra'); | |
const semver = require('semver'); | |
const { version } = fs.readJsonSync('./package.json'); | |
return semver.major(version); | |
- name: Update bug report version | |
uses: ShaMan123/[email protected] | |
with: | |
semver: '>=4.0.0 || >=${{ steps.major.outputs.result }}.0.0-rc || >=${{ steps.major.outputs.result }}.0.0-beta' | |
dry_run: no-push | |
- name: Update bug report node version | |
uses: ShaMan123/[email protected] | |
with: | |
dropdown: _node_version | |
package: node | |
semver: '>=14.0.0' | |
dry_run: no-push | |
- name: Commit & PR | |
uses: peter-evans/[email protected] | |
with: | |
add-paths: .github/ISSUE_TEMPLATE/bug_report.yml | |
branch: ci-update-bug-report | |
base: master | |
delete-branch: true | |
labels: CI/CD, bot, task | |
title: 'chore(): Update bug report' | |
body: | | |
Automated update to `.github/ISSUE_TEMPLATE/bug_report.yml` | |
Triggered by job [`${{ github.job }}`](../actions/runs/${{ github.run_id }}) |