Skip to content

Commit 757018f

Browse files
committed
Fix publish workflow: pass --repo to gh commands
The gh CLI inside a container job may not detect the git repo context. Pass --repo explicitly to all gh release commands.
1 parent 1ec2cfd commit 757018f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,21 @@ jobs:
9595
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9696
run: |
9797
TAG="${{ github.event.release.tag_name }}"
98+
REPO="${{ github.repository }}"
9899
99100
# Upload individual JARs
100101
for jar in dist/opendis7-*.jar; do
101-
gh release upload "$TAG" "$jar" --clobber
102+
gh release upload "$TAG" "$jar" --clobber --repo "$REPO"
102103
done
103104
104105
# Upload javadoc zip
105-
gh release upload "$TAG" dist/opendis7-javadoc.zip --clobber
106+
gh release upload "$TAG" dist/opendis7-javadoc.zip --clobber --repo "$REPO"
106107
107108
# Upload complete bundle
108-
gh release upload "$TAG" opendis7-release.zip --clobber
109+
gh release upload "$TAG" opendis7-release.zip --clobber --repo "$REPO"
109110
110111
# Update release body with the generated description
111-
gh release edit "$TAG" --notes-file /tmp/release-body.md
112+
gh release edit "$TAG" --notes-file /tmp/release-body.md --repo "$REPO"
112113
113114
- name: Upload artifacts
114115
if: github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)