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
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
17 changes: 17 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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-add-on.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)

Expand Down Expand Up @@ -35,7 +35,7 @@ Add the following dependencies in your pom.xml file:
```
<!-- the above dependency should be updated with latest released version information -->

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

Expand Down
Loading