Skip to content

build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 #42

build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1

build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 #42

Workflow file for this run

name: Release
on:
pull_request:
types:
- closed
branches:
- master
jobs:
release:
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'dev'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.16.0"
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Get package version
id: package_version
run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
- name: Read changelog for current version
id: changelog
run: |
VERSION="${{ steps.package_version.outputs.version }}"
{
echo "body<<EOF"
awk -v version="$VERSION" '
$0 ~ "^## \\[" version "\\]" {flag=1}
flag && /^## \[/ && $0 !~ "^## \\[" version "\\]" {exit}
flag
' CHANGELOG.md
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.package_version.outputs.version }}
name: v${{ steps.package_version.outputs.version }}
body: ${{ steps.changelog.outputs.body }}
draft: false
prerelease: false
files: |
dist/bilibili-live-tasks-helper.meta.js
dist/bilibili-live-tasks-helper.user.js
dist/bilibili-live-tasks-helper.min.user.js