Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.18 KB

README.md

File metadata and controls

69 lines (52 loc) · 2.18 KB

Coda Changelog

This Github Action allows you to maintain your projects changelog in a Coda document. 🚀

Set up Coda document

Due to current limitations of the Coda API, you need to manually create tables in your Coda doc to write too.

Tables should contain the following Columns:

Commit | Author | Url | Date

Note: The action relies on your table columns being named correctly.

Setup workflow

Create the following steps for the action in your workflow

- name: Extract branch name
  run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})"
  shell: bash
  id: extract_branch

- name: Update Changelog  
  id: update-changelog
  uses: steamclock/coda-changelog@v1
  with:
    fromTag: '<last release tag>'
    table: '<name of Coda table>' 
    commits: ${{ toJSON(github.event.commits) }}
    token: ${{ secrets.PAT }}
    coda-token: ${{ secrets.CODA_TOKEN }}
    doc-id: '<your doc id>'
    branch: ${{ steps.extract_branch.outputs.branch }}
  env:
   GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Action Inputs

  commits:
    description: 'Github event commits'
  fromTag:
    description: 'Tag to indicate when to fetch commits from for initial write to table'
  token:
    description: 'Github access token'
  branch:
    description: 'Current branch name'
  table:
    description: 'Name of your Coda table to write too'
    default: "Unreleased Changes"
  doc-id:
    description: 'Id of your Coda document'
  coda-token:
    description: 'Coda API Token'

You can get your Coda doc id here: Link to Coda doc id extractor

Add Secrets

Add a secret to your repo for your Coda API Token named CODA_TOKEN

Add a secret to your repo for your Personal Access Token named PAT

Output

Screen Shot 2021-10-20 at 1 14 52 PM