Skip to content

Prepare release

Prepare release #30

name: Prepare release
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
prepare-release:
name: Prepare release and create pre-release PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Bump version and update CHANGELOG.MD
id: changelog
uses: lidofinance/conventional-changelog-action@v3
with:
git-message: "chore(release): {version}"
tag-prefix: ""
output-file: "CHANGELOG.md"
version-file: package.json
version-path: version
release-count: 10 # save all releases in the CHANGELOG.md
git-push: false
skip-on-empty: false
skip-ci: false
create-summary: true
- name: Fail on missing args
if: ${{ !steps.changelog.outputs.version }}
run: >
echo "::error::No version output found for the prev step! Try restarting action" && exit 1
- name: Create Pull Request
uses: lidofinance/create-pull-request@v4
if: ${{ steps.changelog.outputs.version }}
with:
branch: pre-release-${{ steps.changelog.outputs.version }}
title: "chore(release): ${{ steps.changelog.outputs.version }}"
body: "This PR is generated automatically.\nMerge it for the automatic tag creation.\nIf you don't need this PR than close it and **delete source branch**! "