mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-06-20 12:11:43 +00:00
1a1c09449c
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
3.0 KiB
YAML
75 lines
3.0 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
name: Release Please
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
version: '${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}}'
|
|
steps:
|
|
- uses: pnpm/action-setup@v6
|
|
with:
|
|
version: 9
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
|
|
- uses: googleapis/release-please-action@v5
|
|
id: release
|
|
with:
|
|
target-branch: dev
|
|
token: ${{secrets.GH_TOKEN}}
|
|
|
|
# Checkout repos
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
repository: koenkk/zigbee2mqtt
|
|
path: ./z2m
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
repository: koenkk/zigbee2mqtt
|
|
path: ./z2m-master
|
|
ref: master
|
|
|
|
- name: Restore cache commit-user-lookup.json
|
|
uses: actions/cache/restore@v5
|
|
with:
|
|
path: z2m/scripts/commit-user-lookup.json
|
|
key: commit-user-lookup-dummy
|
|
restore-keys: |
|
|
commit-user-lookup-
|
|
- name: Generate changelog
|
|
run: |
|
|
MASTER_Z2M_VERSION=$(cat z2m-master/package.json | jq -r '.version')
|
|
MASTER_ZHC_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee-herdsman-converters"')
|
|
MASTER_ZH_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee-herdsman"')
|
|
MASTER_FRONTEND_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee2mqtt-frontend"')
|
|
MASTER_WINDFRONT_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee2mqtt-windfront"')
|
|
wget -q -O - https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/release-please--branches--dev--components--zigbee2mqtt/CHANGELOG.md > z2m/CHANGELOG.md
|
|
cd z2m
|
|
pnpm i --frozen-lockfile
|
|
node scripts/generateChangelog.mjs $MASTER_Z2M_VERSION $MASTER_ZHC_VERSION $MASTER_ZH_VERSION $MASTER_FRONTEND_VERSION $MASTER_WINDFRONT_VERSION >> ../changelog.md
|
|
env:
|
|
GH_TOKEN: ${{secrets.GH_TOKEN}}
|
|
- name: Update changelog gist
|
|
run: |
|
|
gh gist edit bfd4c3d1725a2cccacc11d6ba51008ba -a changelog.md
|
|
env:
|
|
GH_TOKEN: ${{secrets.GH_TOKEN}}
|
|
- name: Save cache commit-user-lookup.json
|
|
uses: actions/cache/save@v5
|
|
if: always()
|
|
with:
|
|
path: z2m/scripts/commit-user-lookup.json
|
|
key: commit-user-lookup-${{ hashFiles('z2m/scripts/commit-user-lookup.json') }}
|