Don't merge - Escape PR titles and prevent special characters from messing slack JSON payload #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
release: | |
types: [released] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
jobs: | |
deploy: | |
name: 'Test' | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout repository' | |
uses: actions/checkout@v3.3.0 | |
- name: 'Get Package Version' | |
id: package-version | |
if: ${{ steps.version.outputs.version != 'current' }} | |
uses: martinbeentjes/npm-get-version-action@master | |
# ===================================== | |
# Build Changelog ===================== | |
# ===================================== | |
- name: 'Build Changelog' | |
uses: mikepenz/release-changelog-builder-action@v3 | |
id: build_changelog | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
fromTag: '2.0.9' | |
toTag: ${{ github.ref }} | |
configuration: './.github/config/changelog_configuration.json' | |
- name: 'Write changelog step outputs to console' | |
env: | |
CHANGELOG: ${{ toJson(steps.build_changelog.outputs.changelog) }} | |
run: | | |
echo "$CHANGELOG" | |
- name: 'Write changelog step outputs to console' | |
env: | |
CHANGELOG: ${{ toJson(steps.build_changelog.outputs) }} | |
run: | | |
echo "$CHANGELOG" | |
- name: 'Update Changelog' | |
if: steps.build_changelog.outputs.changelog != '' | |
uses: stefanzweifel/changelog-updater-action@v1 | |
with: | |
latest-version: '${{ steps.package-version.outputs.current-version }}' | |
release-notes: ${{steps.build_changelog.outputs.changelog}} | |
- name: 'Write changelog step outputs to console' | |
run: | | |
cat CHANGELOG.md |