Skip to content

Version 6.0.0-beta18 #105

Version 6.0.0-beta18

Version 6.0.0-beta18 #105

Workflow file for this run

name: Node.js Package
on:
release:
branches:
- master
- 5.x
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.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-latest
# wait for publishing to complete
needs: publish-npm
if: always()
steps:
- uses: actions/checkout@v3
with:
ref: master
- uses: actions/setup-node@v3
with:
node-version: 18.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 }})