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
54 changes: 52 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
dist-files: ${{ steps.collect-dist-files.outputs.files }}
timestamp: ${{ steps.build-release.outputs.timestamp }}
timestamp: ${{ steps.timestamp.outputs.timestamp }}

steps:
- name: Set Timestamp
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Upload dist bundle (internal)
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: dist-bundle-${{ github.event.repository.name }}-${{ steps.build-release.outputs.timestamp }}
name: dist-bundle-${{ github.event.repository.name }}-${{ steps.timestamp.outputs.timestamp }}
path: |
./dist/bundles/**/*.jar
!./dist/bundles/**/*-javadoc*.jar
Expand Down Expand Up @@ -146,3 +146,53 @@ jobs:
env:
GITHUB_BEARER: ${{ secrets.GH_PAT_public_read_example_pde_rcp_2026 }}
run: ./gradlew --no-daemon clean build

publish-latest-main:
name: Publish latest-main release
runs-on: ubuntu-latest
needs:
- build-release
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Download dist bundle
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: dist-bundle-${{ github.event.repository.name }}-${{ needs.build-release.outputs.timestamp }}
path: .

- name: Create or update latest-main release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
shell: bash
run: |
mapfile -t JARS < <(find dist/bundles -name "*.jar" \
! -name "*-javadoc*.jar" \
! -name "*-sources*.jar" \
-type f | sort)

if [ ${#JARS[@]} -eq 0 ]; then
echo "No JAR files found – skipping release update."
exit 0
fi

echo "Artifacts to publish:"
printf ' %s\n' "${JARS[@]}"

gh release delete latest-main --yes --cleanup-tag 2>/dev/null || true

printf 'Automatically updated on every successful build of the `main` branch.\n\nCommit: [`%s`](https://github.com/%s/commit/%s)\n' \
"${GITHUB_SHA:0:12}" "${GITHUB_REPOSITORY}" "${GITHUB_SHA}" > /tmp/release-notes.md

gh release create latest-main \
--title "Latest main branch build" \
--notes-file /tmp/release-notes.md \
--prerelease \
--target "${GITHUB_SHA}" \
"${JARS[@]}"
63 changes: 63 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy doc on GitHub Pages

on:
# Runs after the CI workflow completes on the main branch
workflow_run:
workflows: ["Continuous Integration"]
branches: ["main"]
types: [completed]

# Runs on pushes targeting the main branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the
# run in-progress and latest queued. Do NOT cancel in-progress runs.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
doc-build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Inject source revision for docs
run: 'echo "source_revision: ${GITHUB_SHA}" >> _doc/_config.yml'

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b

- name: Build with Jekyll
uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697
with:
source: ./_doc
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: doc-build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
3 changes: 3 additions & 0 deletions _doc/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem "webrick", "~> 1.8"
15 changes: 15 additions & 0 deletions _doc/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins:
- jekyll-github-metadata
- jekyll-seo-tag
- jekyll-sitemap
markdown: kramdown

github: [metadata]
repository: klibio/apps

defaults:
-
scope:
path: ""
values:
layout: default
Loading
Loading