@@ -25,17 +25,11 @@ jobs:
25
25
env :
26
26
ref : ${{ inputs.ref || github.ref || github.sha }}
27
27
steps :
28
- # Setup and install
29
28
- uses : actions/checkout@v3
30
29
with :
31
30
ref : ${{ env.ref }}
32
- # auto-changelog requires sufficient history to work with
33
- fetch-depth : 100
34
- - uses : actions/setup-node@v3
35
- with :
36
- node-version-file : ' .nvmrc'
37
- cache : ' npm'
38
- - run : npm ci
31
+ # auto-changelog needs a full fetch for tag info
32
+ fetch-depth : 0
39
33
40
34
# Check to see if the package.json version has changed
41
35
- id : check
@@ -49,14 +43,18 @@ jobs:
49
43
static-checking : ${{ github.event_name == 'workflow_dispatch' && 'localIsNew' || '' }}
50
44
file-url : https://unpkg.com/igir/package.json
51
45
46
+ - if : steps.check.outputs.changed == 'true'
47
+ uses : actions/setup-node@v3
48
+ with :
49
+ node-version-file : ' .nvmrc'
50
+ cache : ' npm'
51
+ - if : steps.check.outputs.changed == 'true'
52
+ run : npm ci
53
+
52
54
# Generate the release's markdown template
53
55
- if : steps.check.outputs.changed == 'true'
54
56
id : auto-changelog
55
57
run : |
56
- # NOTE: auto-changelog operates off of git tags, but the tag won't exist until the
57
- # GitHub release is published.
58
- git tag v${{ steps.check.outputs.version }}
59
- # Generate the markdown
60
58
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
61
59
echo "MARKDOWN<<$EOF" >> "$GITHUB_OUTPUT"
62
60
./scripts/auto-changelog.sh >> "$GITHUB_OUTPUT"
0 commit comments