Skip to content

Popularity Update

Popularity Update #47

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Publish package
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
inputs:
packagePrefix:
required: true
default: 'SNAPSHOT'
description: "Packages require a package version, Keep SNAPSHOT for snapshot upload. Replace SNAPSHOT for staging deploy."
release:
types: # This configuration does not affect the page_build event above
- created
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/[email protected]
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- if: github.event.release.tag_name == ''
name: Publish SNAPSHOT package
run: ./gradlew publish --no-daemon
env:
ORG_GRADLE_PROJECT_github_token: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_github_actor: ${ GITHUB_ACTOR }
ORG_GRADLE_PROJECT_sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_version: ${{ steps.extract_branch.outputs.branch }}-${{ github.run_id }}-${{ github.event.inputs.packagePrefix }}
- if: github.event.inputs.packagePrefix == ''
name: Publish Release package
run: ./gradlew publish --no-daemon
env:
ORG_GRADLE_PROJECT_github_token: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_github_actor: ${ GITHUB_ACTOR }
ORG_GRADLE_PROJECT_sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_version: ${{ github.event.release.tag_name }}