mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
Add tool & workflow to fetch changelog
Rewrote the changelog script to use primarily merged pull requests between "commit A" and "commit B". It uses the GitHub rest api. The resulting data is pushed to a draft gist. Manual usage is in the README. Also adds a GitHub workflow action to run the tool on demand, through the GitHub action's interface.
This commit is contained in:
44
.github/workflows/fetch-changes.yml
vendored
Normal file
44
.github/workflows/fetch-changes.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Fetch Merged Changes
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
fromCommit:
|
||||
description: 'From Commit SHA (full-length)'
|
||||
required: true
|
||||
toCommit:
|
||||
description: 'To Commit SHA (full-length, if omitted will use latest)'
|
||||
|
||||
jobs:
|
||||
fetchChangelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node v16.13.1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.13.1
|
||||
cache: 'npm'
|
||||
- name: Install NPM dependencies
|
||||
working-directory: ./tools/fetch-changelog
|
||||
run: npm ci
|
||||
- name: Fetch Changes from GitHub API
|
||||
working-directory: ./tools/fetch-changelog
|
||||
env:
|
||||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
node index.js \
|
||||
--from=${{ github.event.inputs.fromCommit }} \
|
||||
--to=${{ github.event.inputs.toCommit }} > changes.md
|
||||
echo
|
||||
echo "============================================================"
|
||||
echo
|
||||
cat changes.md
|
||||
echo
|
||||
echo "============================================================"
|
||||
echo
|
||||
echo "You may want to go to https://gist.github.com/ to upload the final changelog"
|
||||
echo "The next step will require an url because we can't easily pass multiline strings to actions"
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bitburner_changelog___DRAFT.md
|
||||
path: ./tools/fetch-changelog/changes.md
|
||||
Reference in New Issue
Block a user