GitHub Action
Changie release
v0.5.0
Latest version
Automate version and release management using changie
This action creates a new PR with an updated CHANGELOG.md
file. When merged it
will automatically create a new tag and trigger another GitHub action workflow
that can then do the actual release.
The workflow is inspired both by changie and @changesets/action
name: Test changes
on:
push:
branches:
- 'main'
permissions:
contents: write
pull-requests: write
actions: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare release
uses: labd/changie-release-action@v0.5.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Optionally run a command with the new version number when the new
# version is determined.
version-command: 'echo "New version is $PACKAGE_VERSION" > version.txt'
# Trigger another release workflow to do the actual release.
# Set to for example `release.yaml` to trigger that workflow.
# Default is no trigger
release-workflow: 'release.yaml'
This triggered workflow needs the on: workflows
event. For example:
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "${GITHUB_REF#refs/*/}"