Skip to content

labd/changie-release-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

changie-release-action

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

Usage

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'

Triggering a release

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/*/}"