Skip to main content

Attaching a Github Repo

Prerequisites

Adding a Github Workflow Action

Simply add this file to the project you want to attach.

.github/workflows/releasaurus
name: releasaurus

on:
release:
types: [published]

jobs:
releasaurus:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: "jamzsh/releasaurus" # Update with your own fork
token: ${{ secrets.PAT }}
- name: create-branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b ${{ github.event.repository.name }}
yarn install
yarn notes-please create -a ${{ secrets.PAT }} -r ${{ github.repository }} -p releases/${{ github.event.repository.name }}
git add releases/${{ github.event.repository.name }}/${{ github.event.release.tag_name }}-${{ github.event.repository.name }}.mdx
git commit -m "Release notes for ${{ github.event.release.tag_name }}-${{ github.event.repository.name }}"
git push -u origin ${{ github.event.repository.name }}
- name: pull-request
uses: repo-sync/pull-request@v2
with:
pr_title: "Release notes for ${{ github.event.release.tag_name }}-${{ github.event.repository.name }}"
pr_body: |
Release notes for Releasaurus
I'm a :robot:
source_branch: ${{ github.event.repository.name }}
destination_branch: "main"
github_token: ${{ secrets.PAT }}
destination_repository: "jamzsh/releasaurus" # Update with your own fork

What is this doing? TL;DR

Whenever there is a new release, this Github action will checkout the latest version of your forked Releasaurus and pull the information of the latest release and create a PR.