Skip to content

Deploy vaadin-flow-sockjs classifiers #1236

Deploy vaadin-flow-sockjs classifiers

Deploy vaadin-flow-sockjs classifiers #1236

name: Deploy vaadin-flow-sockjs classifiers
on:
workflow_dispatch:
inputs:
script-from-branch:
description: "Checkout deploy script from dispatching branch"
type: boolean
default: false
schedule:
- cron: '0 2 * * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
branch: [ "development", "vaadin-24.3", "vaadin-23" ]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
- name: Checkout latest tag
id: checkout-tag
run: |
TAG=$(git describe --abbrev=0 --tags --match="flow-*")
VERSION=${TAG/flow-/}
echo "vertx-vaadin-version=${VERSION}" >> "$GITHUB_OUTPUT"
git checkout $TAG
- name: Checkout deploy script
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.script-from-branch }}
run: git checkout $GITHUB_WORKFLOW_SHA -- tools/build_flow_widgetsets.sh
- name: Set up Java
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
server-id: repsy-vertx-vaadin
server-username: REPSY_USERNAME
server-password: REPSY_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Set version
run: mvn -N -ntp versions:set -DnewVersion="${{ steps.checkout-tag.outputs.vertx-vaadin-version }}"
- name: Deploy classifiers
run: |
set -x -e -o pipefail
./mvnw -N -ntp install
PRJ_VERSION=$(./mvnw -pl :vaadin-flow-sockjs help:evaluate -q -Dexpression='project.version' -DforceStdout)
KIND=$( [[ "${PRJ_VERSION}" =~ "-SNAPSHOT"$ ]] && echo "snapshot" || echo "release" )
DEPLOY_OPTS="-Ddistribution.id=repsy-vertx-vaadin -Dvertx-vaadin.release.gpg" ./tools/build_flow_widgetsets.sh deploy ${KIND}
env:
REPSY_USERNAME: ${{ secrets.REPSY_USERNAME }}
REPSY_PASSWORD: ${{ secrets.REPSY_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}