Skip to content

Version 6.0.0-beta16 #103

Version 6.0.0-beta16

Version 6.0.0-beta16 #103

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/gha-populate-form-version@v2.0.1
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/gha-populate-form-version@v2.0.1
with:
dropdown: _node_version
package: node
semver: '>=14.0.0'
dry_run: no-push
- name: Commit & PR
uses: peter-evans/create-pull-request@v4.1.3
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 }})