Skip to content

Commit 903acd0

Browse files
authoredJul 29, 2023
CI: release drafter GitHub Action requires full commit log depth (#535)
1 parent 0ecc4e0 commit 903acd0

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed
 

‎.github/workflows/release-drafter.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,11 @@ jobs:
2525
env:
2626
ref: ${{ inputs.ref || github.ref || github.sha }}
2727
steps:
28-
# Setup and install
2928
- uses: actions/checkout@v3
3029
with:
3130
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
3933

4034
# Check to see if the package.json version has changed
4135
- id: check
@@ -49,14 +43,18 @@ jobs:
4943
static-checking: ${{ github.event_name == 'workflow_dispatch' && 'localIsNew' || '' }}
5044
file-url: https://unpkg.com/igir/package.json
5145

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+
5254
# Generate the release's markdown template
5355
- if: steps.check.outputs.changed == 'true'
5456
id: auto-changelog
5557
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
6058
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
6159
echo "MARKDOWN<<$EOF" >> "$GITHUB_OUTPUT"
6260
./scripts/auto-changelog.sh >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)