Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ jobs:
--title "$GITHUB_REF_NAME" \
--notes-file /tmp/release-notes.md

reference-docs:
needs: release
# release itself ran past a skipped integration job, so say outright that
# only its own success matters here.
if: always() && needs.release.result == 'success'
permissions:
contents: write
uses: ./.github/workflows/reference-docs.yml
with:
tag: ${{ github.ref_name }}

docs:
needs: unit
runs-on: ubuntu-latest
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/reference-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Reference documentation archive

# Attaches the generated Javadoc of a release to that release, as a tar.gz with its checksum, so the
# QTSurfer website can publish it. It runs after every release (see ci.yml) and by hand to build the
# archive of a release that already exists.
on:
workflow_call:
inputs:
tag:
description: Release tag to document
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: Existing release tag to document
required: true
type: string

permissions:
contents: write

jobs:
archive:
runs-on: ubuntu-latest
env:
TAG: ${{ inputs.tag }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Check that the release exists
run: gh release view "$TAG" --repo "$GITHUB_REPOSITORY" > /dev/null
- uses: actions/checkout@v4
with:
ref: refs/tags/${{ inputs.tag }}
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Generate javadoc
run: mvn -B javadoc:javadoc
- name: Package the documentation
run: |
name="sdk-java-docs-${TAG}"
tar -czf "${name}.tar.gz" -C target/site/apidocs .
sha256sum "${name}.tar.gz" > "${name}.tar.gz.sha256"
- name: Attach it to the release
run: |
name="sdk-java-docs-${TAG}"
gh release upload "$TAG" "${name}.tar.gz" "${name}.tar.gz.sha256" \
--repo "$GITHUB_REPOSITORY" --clobber
Loading