chore(release): prepare for v0.9.0 #33
Workflow file for this run
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: Trakt Integration Continuous Deployment | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
cd: | |
runs-on: ubuntu-latest | |
outputs: | |
release_body: ${{ steps.release.outputs.RELEASE_BODY }} | |
steps: | |
- name: Set the release version | |
shell: bash | |
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Create changes | |
shell: bash | |
run: touch CHANGES.md | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@v1 | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: -vv --latest --strip header | |
env: | |
OUTPUT: CHANGES.md | |
- name: Set the release body | |
id: release | |
shell: bash | |
run: | | |
r=$(cat ${{ steps.git-cliff.outputs.changelog }}) | |
r="${r//'%'/'%25'}" # Multiline escape sequences for % | |
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n' | |
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r' | |
echo "::set-output name=RELEASE_BODY::$r" | |
- name: Create the release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: "Release v${{ env.RELEASE_VERSION }}" | |
body: ${{ steps.release.outputs.RELEASE_BODY }} | |
env: | |
GITHUB_REPOSITORY: dylandoamaral/trakt-integration |