Even though the name says Group of People, it can be just you. The aim of this project is to publish and archive newsletters to a target email address.
- Write a content to be included in newsletter in YAML format under
current
directory.- Examples can be found in test directory.
- Create a PR for the write-up and merge it.
- If merged PRs exceeds the number of N, a newsletter contains those contents will be published.
- Published newsletters will be archived under
archive
directory by assigning the issue number. - Also they will be archived by assigned tags (Markdown for each tag will be created, then each markdown contains a list of links to the original YAML file)
You need to create GitHub Secrets named EMAIL
and EMAIL_PASSWORD
with appropriate values. Those values will be used in .github/workflows/newsletter.yml
GitHub Action file to send out emails.
It basically collects every yaml files under /current
directory. The name of yaml file should be formatted as YYYY-MM-DD Title
so the files can be ordered correctly by themselves. The CLI below shows how to publish a newsletter manually.
# under src/ directory
$ go run main.go publish current
If you want to publish a newsletter based on GitHub Action, you need to configure .github/workflows/newsletter.yml
. By default, it publish a newsletter when there are four yaml files in current
directory. However, you can change the number of yaml files to trigger the publishing behaviour. Just change every line(below) of newsletter.yml
as you like.
steps.number_check.outputs.number == HOW_MANY_YAML_FILES
date: YYYY-MM-DD hh:mm
author: author name
title: title
thumbnail: image URL
link: link URL to the original
summary: preferably up to 2-3 sentences
opinion: preferably up to 5-8 sentences
tags: ["tag1", "tag2"]
The referenced newsletter layout is below that I have used for other purposes.
- Parsing YAML
- Filling Template
- Sending Email
- Move Current YAMLs to Archive
- Write CI/CD script (GitHub Action)