forked from bitburner-official/bitburner-src
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (43 loc) · 1.48 KB
/
fetch-changes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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@v4
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
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@v4
with:
name: bitburner_changelog___DRAFT.md
path: ./tools/fetch-changelog/changes.md