From cc4e7bda482a1667a8e8179843d8e818481fc557 Mon Sep 17 00:00:00 2001 From: Leonardo Scardanzan Date: Fri, 20 Nov 2026 10:34:55 -0300 Subject: [PATCH 1/2] ci: release and deploy snapshots with GitHub Actions Snapshots are deployed to GitHub Packages on every push to master. Releases are run by hand and staged on the Central Portal, and the snapshot of the next development version is deployed after them. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 46 ++++++++++++++++++++++++++++++++++ .github/workflows/snapshot.yml | 17 +++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/snapshot.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7c0b601 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Release + +# Run from the branch to release. On a maintenance branch, set `java-version` to the +# JDK the branch targets. +on: + workflow_dispatch: + inputs: + dry-run: + description: Dry run (release:prepare -DdryRun=true, nothing is pushed or deployed) + type: boolean + default: true + release-version: + description: Release version (leave empty for the default) + type: string + required: false + development-version: + description: Next development version (leave empty for the default) + type: string + required: false + +jobs: + release: + permissions: + contents: write + uses: FlowingCode/GithubActions/.github/workflows/maven-release.yml@main + with: + java-version: '17' + dry-run: ${{ inputs.dry-run }} + release-version: ${{ inputs.release-version }} + development-version: ${{ inputs.development-version }} + secrets: inherit + + # The release pushes the next development version with GITHUB_TOKEN, which does not + # trigger the Snapshot workflow, so the new snapshot is deployed from here. `ref` + # makes it build the branch head (the new SNAPSHOT version), not the commit the + # release was started from. + snapshot: + needs: release + if: ${{ !inputs.dry-run }} + permissions: + contents: read + packages: write + uses: FlowingCode/GithubActions/.github/workflows/maven-snapshot.yml@main + with: + java-version: '17' + ref: ${{ github.ref }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 0000000..b4ce1a5 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,17 @@ +name: Snapshot + +# On a maintenance branch, set `branches` to that branch and `java-version` to the +# JDK the branch targets. +on: + push: + branches: [ "master" ] + workflow_dispatch: + +jobs: + snapshot: + permissions: + contents: read + packages: write + uses: FlowingCode/GithubActions/.github/workflows/maven-snapshot.yml@main + with: + java-version: '17' From ea1476e682b3d7448c324f7d2115b307089dd2ea Mon Sep 17 00:00:00 2001 From: Leonardo Scardanzan Date: Fri, 20 Nov 2026 10:34:55 -0300 Subject: [PATCH 2/2] docs: point build badge and snapshots to GitHub Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe9660d..d0db3d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/relative-time-add-on) [![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/relative-time-addon.svg)](https://vaadin.com/directory/component/relative-time-add-on) -[![Build Status](https://jenkins.flowingcode.com/job/RelativeTime-addon/badge/icon)](https://jenkins.flowingcode.com/job/RelativeTime-addon) +[![Build Status](https://github.com/FlowingCode/RelativeTime/actions/workflows/maven.yml/badge.svg)](https://github.com/FlowingCode/RelativeTime/actions/workflows/maven.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.flowingcode.vaadin.addons/relative-time-addon)](https://mvnrepository.com/artifact/com.flowingcode.vaadin.addons/relative-time-addon) [![Javadoc](https://img.shields.io/badge/javadoc-00b4f0)](https://javadoc.flowingcode.com/artifact/com.flowingcode.vaadin.addons/relative-time-addon) @@ -35,7 +35,7 @@ Add the following dependencies in your pom.xml file: ``` -Release versions are available from Maven Central repository. For SNAPSHOT versions see [here](https://maven.flowingcode.com/snapshots/). +Release versions are available from Maven Central repository. SNAPSHOT versions are published to [GitHub Packages](https://github.com/FlowingCode/RelativeTime/packages) (`https://maven.pkg.github.com/FlowingCode/RelativeTime`), which requires authenticating with a GitHub token that has the `read:packages` scope. ## Building and running demo