changelog #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: changelog | |
on: | |
schedule: | |
# Runs "every Monday at midnight" (see https://crontab.guru) | |
- cron: "0 0 * * MON" | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git Checkout | |
uses: actions/checkout@v3 | |
- name: 🔢 Setting up environment | |
id: environment | |
run: | | |
echo "year=$(date -u "+%Y")" >> $GITHUB_OUTPUT | |
echo "date=$(date -u "+%d-%m-%y")" >> $GITHUB_OUTPUT | |
echo "readableDate=$(date -u "+%b %d, %Y")" >> $GITHUB_OUTPUT | |
- name: 🛫 Setting up Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: 🗓️ Creating directory for the year | |
run: mkdir -p ${{ steps.environment.outputs.year }} | |
- name: 📜 Generating CHANGELOG | |
run: | | |
export CHANGELOG_GITHUB_TOKEN=${{ secrets.CHANGELOG_GITHUB_TOKEN}} | |
deno run --allow-net --allow-env generate-changelog.ts > ${{ steps.environment.outputs.year }}/${{ steps.environment.outputs.date }}.md | |
- name: 🏁 Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
base: main | |
branch: "feat/changelog-for-${{ steps.environment.outputs.date }}" | |
title: "feat: CHANGELOG for ${{ steps.environment.outputs.readableDate }}" | |
body: "Look mom, I generated a changelog!!!" | |
author: vgvbot <[email protected]> | |
commit-message: "feat: CHANGELOG for ${{ steps.environment.outputs.readableDate }}" | |
committer: vgvbot <[email protected]> |