Skip to content

Add config file support and dry run option #146

Add config file support and dry run option

Add config file support and dry run option #146

Workflow file for this run

name: 'test workflow'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: draft-release
with:
variables: |
helm-chart=v0.1.1
foo=bar
my-variable=My Variable
notes-header: |
## Welcome to the {{version}} release of Draft Release
The previous release was {{previous-version}}.
This is some text to welcome you to the release {{version-number}}.
## Helm Chart
The Helm Chart version for this release is {{helm-chart}}.
## My Variable
The value of my variable is {{my-variable}}.
notes-footer: |
## Upgrade
- For Docker, use the {{version}} image from Docker Hub.
- For Binaries use the {{version-number}} release from GitHub.
- For Helm Chart, use the {{helm-chart}} version.
- For foo use the {{foo}} version.
- run: |
echo "Version: ${{ steps.draft-release.outputs.version }}"
echo "Previous Version: ${{ steps.draft-release.outputs.previous-version }}"
echo "Release Notes: ${{ steps.draft-release.outputs.release-notes }}"
echo "Release URL: ${{ steps.draft-release.outputs.release-url }}"
echo "Release ID: ${{ steps.draft-release.outputs.release-id }}"
echo "Release Sections: ${{ steps.draft-release.outputs.release-sections }}"
test-dry-run-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: draft-release
with:
config-path: .github/release-notes.yml
dry-run: true
variables: |
helm-chart=v0.1.1
foo=bar
my-variable=My Variable
notes-header: |
## Welcome to the {{version}} release of Draft Release
The previous release was {{previous-version}}.
This is some text to welcome you to the release {{version-number}}.
## Helm Chart
The Helm Chart version for this release is {{helm-chart}}.
## My Variable
The value of my variable is {{my-variable}}.
notes-footer: |
## Upgrade
- For Docker, use the {{version}} image from Docker Hub.
- For Binaries use the {{version-number}} release from GitHub.
- For Helm Chart, use the {{helm-chart}} version.
- For foo use the {{foo}} version.
- run: |
echo "Version: ${{ steps.draft-release.outputs.version }}"
echo "Previous Version: ${{ steps.draft-release.outputs.previous-version }}"
echo "Release Notes: ${{ steps.draft-release.outputs.release-notes }}"
echo "Release URL: ${{ steps.draft-release.outputs.release-url }}"
echo "Release ID: ${{ steps.draft-release.outputs.release-id }}"
echo "Release Sections: ${{ steps.draft-release.outputs.release-sections }}"