Skip to content

build(deps): bump mdast-util-to-markdown from 2.1.1 to 2.1.2 in /www #155

build(deps): bump mdast-util-to-markdown from 2.1.1 to 2.1.2 in /www

build(deps): bump mdast-util-to-markdown from 2.1.1 to 2.1.2 in /www #155

name: Push Changelog Changes to Discord
on:
push:
branches:
- main
pull_request:
permissions: {}
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: read
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: www
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**/CHANGELOG.md
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Persist npm cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- run: npm install
- name: Changelog Dry Run
if: github.ref != 'refs/heads/main'
env:
discord__token: ${{ secrets.DISCORDTOKEN }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
npm run discord-changelog -- ../"$file" --dry-run
done
- name: Changelog Push
if: github.ref == 'refs/heads/main'
env:
discord__token: ${{ secrets.DISCORDTOKEN }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
npm run discord-changelog -- ../"$file"
done