rsql #202
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: rsql | |
on: | |
create: | |
branches: [ 'release/**' ] | |
push: | |
branches: [ main ] | |
tags: [ 'rsql/v*' ] | |
paths: | |
- 'buildSrc' | |
- 'rsql/**' | |
- '.github/workflows/rsql.yml' | |
- '.github/actions/*.yml' | |
pull_request: | |
types: [ opened, synchronize, reopened, closed ] | |
branches: [ main ] | |
paths: | |
- 'buildSrc' | |
- 'rsql/**' | |
- '.github/workflows/rsql.yml' | |
- '.github/actions/*.yml' | |
env: | |
PROFILE: rsql | |
jobs: | |
context: | |
uses: ./.github/workflows/subwf-context.yml | |
with: | |
profile: 'rsql' | |
gitTagPrefix: 'rsql/v' | |
versionFile: rsql/gradle.properties | |
secrets: | |
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }} | |
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }} | |
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }} | |
build: | |
needs: context | |
if: needs.context.outputs.shouldBuild == 'true' | |
strategy: | |
matrix: | |
java: [ '8', '11', '17' ] | |
os: [ 'ubuntu-latest', 'windows-latest' ] | |
name: Build & Test Java ${{ matrix.java }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Build | |
uses: ./.github/actions/gha-build | |
with: | |
profile: ${{ env.PROFILE }} | |
version: ${{ needs.context.outputs.version }} | |
semanticVersion: ${{ needs.context.outputs.semanticVersion }} | |
hashVersion: ${{ needs.context.outputs.commitId }} | |
javaVersion: ${{ matrix.java }} | |
- name: Test | |
shell: bash | |
run: ./gradlew test -Pprofile=${{ env.PROFILE }} | |
docs: | |
needs: [ context, build ] | |
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true' | |
runs-on: ubuntu-latest | |
env: | |
REPO: zero88/jooqx | |
REF: main | |
WORKFLOW: wfd-docs.yml | |
GITHUB_TOKEN: ${{ secrets.OSS_GITHUB_TOKEN }} | |
steps: | |
- name: Trigger build ${{ env.PROFILE }} documentation | |
shell: bash | |
run: | | |
gh workflow run ${{ env.WORKFLOW }} --repo ${{ env.REPO }} --ref ${{ env.REF }} \ | |
-f profile=${{ env.PROFILE }} \ | |
-f version=${{ needs.context.outputs.version }} \ | |
-f semanticVersion=${{ needs.context.outputs.semanticVersion }} \ | |
-f hashVersion=${{ needs.context.outputs.commitId }} \ | |
-f sha=${{ needs.context.outputs.sha }} \ | |
-f isRelease=${{ needs.context.outputs.isRelease }} \ | |
-f antoraBuildDir=rsql/asciidoc/build/docs/antora | |
- name: Verify GitHub workflow run | |
shell: bash | |
run: | | |
sleep 5 | |
fields=workflowDatabaseId,databaseId,status,event,headBranch,headSha,name,conclusion,url,createdAt,updatedAt | |
gh run list -R ${{ env.REPO }} -b ${{ env.REF }} -w ${{ env.WORKFLOW }} -L 1 --json $fields | jq | |
publish: | |
needs: [ context, build ] | |
if: needs.context.outputs.shouldPublish == 'true' || needs.context.outputs.isRelease == 'true' | |
uses: ./.github/workflows/subwf-publish.yml | |
with: | |
profile: 'rsql' | |
version: ${{ needs.context.outputs.version }} | |
semanticVersion: ${{ needs.context.outputs.semanticVersion }} | |
hashVersion: ${{ needs.context.outputs.commitId }} | |
isRelease: ${{ needs.context.outputs.isRelease }} | |
secrets: | |
ossrhUser: ${{ secrets.OSS_SONATYPE_USER }} | |
ossrhToken: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }} | |
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }} | |
release: | |
needs: [ context, publish, docs ] | |
if: needs.context.outputs.isRelease == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.OSS_GITHUB_TOKEN }} | |
with: | |
name: Release ${{ env.PROFILE }} ${{ needs.context.outputs.version }} | |
tag_name: ${{ needs.context.outputs.branch }} | |
generate_release_notes: false |