Deploy vaadin-flow-sockjs classifiers #988
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy vaadin-flow-sockjs classifiers | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
branch: [ "development" ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ matrix.branch }} | |
fetch-depth: 0 | |
- name: Save current script | |
run: cp ./tools/build_flow_widgetsets.sh /tmp/current_build_flow_widgetsets.sh | |
- 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: Set up Java | |
uses: actions/setup-java@v3 | |
with: # running setup-java again overwrites the settings.xml | |
distribution: 'temurin' | |
java-version: '11' | |
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: Restore current script | |
run: cp /tmp/current_build_flow_widgetsets.sh ./tools/build_flow_widgetsets.sh | |
- 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 }} |