Skip to content

Commit

Permalink
Upload documentation zip to the GitHub release
Browse files Browse the repository at this point in the history
Closes #551

Signed-off-by: rmartinc <rmartinc@redhat.com>
  • Loading branch information
rmartinc authored and mposolda committed Jan 14, 2025
1 parent ebded0c commit 2620ca2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/x-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@ jobs:
npm pack
mv -T *.tgz keycloak-nodejs-connect.tgz
- name: Create guides zip
run: |
npm install
npm run guides
- name: Upload to GitHub Releases
run: |
for i in `gh release view ${{ inputs.tag }} --json assets --jq '.assets[].name'`; do
test -f $i || gh release delete-asset ${{ inputs.tag }} $i -y
done
gh release upload ${{ inputs.tag }} keycloak-nodejs-connect.tgz --clobber
gh release upload ${{ inputs.tag }} keycloak-nodejs-connect.tgz "guides/target/keycloak-nodejs-connect-guides.zip" --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion guides/guides.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const main = async (version) => {
fs.cpSync(path.join(dir, 'images'), path.join(outputDir, 'images'), { recursive: true })
fs.cpSync(path.join(dir, 'attributes.adoc'), path.join(outputDir, 'attributes.adoc'))

const zipFile = path.join(targetDir, 'keycloak-nodejs-connect-guides-' + version + '.zip')
const zipFile = path.join(targetDir, 'keycloak-nodejs-connect-guides.zip')
generateZip(new JSZip(), zipFile, outputDir, targetDir)
}

Expand Down

0 comments on commit 2620ca2

Please sign in to comment.