Skip to content

[init] Update ci.yaml #8

[init] Update ci.yaml

[init] Update ci.yaml #8

Workflow file for this run

name: build-release
on:
create:
branches: [ release/** ]
push:
branches:
- main
- hotfix/**
tags: [ 'v*' ]
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '*.md'
- 'LICENSE'
pull_request:
types: [ opened, synchronize, reopened, closed ]
branches:
- main
- hotfix/**
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- '*.md'
- 'LICENSE'
jobs:
context:
uses: zero88/shared-ghactions/.github/workflows/project-context.yml@main
with:
profile: 'beanx'
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }}
build:
uses: zero88/shared-ghactions/.github/workflows/gradle-build.yml@main
needs: context
if: needs.context.outputs.shouldBuild == 'true'
with:
profile: 'ciBuild'
version: ${{ needs.context.outputs.version }}
semanticVersion: ${{ needs.context.outputs.semanticVersion }}
hashVersion: ${{ needs.context.outputs.commitId }}
analysis:
uses: zero88/shared-ghactions/.github/workflows/gradle-analysis.yml@main
needs: [ context, build ]
if: needs.context.outputs.shouldBuild == 'true'
with:
profile: 'ciSonar'
semanticVersion: ${{ needs.context.outputs.semanticVersion }}
branch: ${{ needs.context.outputs.branch }}
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}
sonarToken: ${{ secrets.OSS_SONARQUBE_TOKEN }}
docs:
uses: zero88/shared-ghactions/.github/workflows/antora-docs.yml@main
needs: [ context, build ]
if: needs.context.outputs.shouldPublish == 'true'
with:
profile: 'beanx'
version: ${{ needs.context.outputs.version }}
hashVersion: ${{ needs.context.outputs.commitId }}
sha: ${{ needs.context.outputs.sha }}
isRelease: ${{ needs.context.outputs.isRelease }}
antoraBuildDir: docs/build/docs/antora
docBranch: ${{ needs.context.outputs.docBranch }}
docVersion: ${{ needs.context.outputs.docVersion }}
docCommitMsg: ${{ needs.context.outputs.docCommitMsg }}
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }}
webdocs:
uses: zero88/shared-ghactions/.github/workflows/webdocs-standalone-publish.yml@main
needs: [ context, docs ]
if: needs.context.outputs.shouldPublish == 'true'
with:
profile: 'beanx'
webdocsRepo: 'zero88/jooqx-webdocs'
webdocsRef: 'main'
docCommitMsg: ${{ needs.context.outputs.docCommitMsg }}
secrets:
githubToken: ${{ secrets.OSS_GITHUB_TOKEN }}
gpgKey: ${{ secrets.CI_GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.CI_GPG_PASSPHARSE }}
publish:
uses: zero88/shared-ghactions/.github/workflows/gradle-publish.yml@main
needs: [ context, analysis, webdocs ]
if: needs.context.outputs.shouldPublish == 'true'
with:
profile: 'beanx'
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:
runs-on: ubuntu-latest
needs: [ context, publish ]
if: needs.context.outputs.isRelease == 'true'
steps:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release bean.x ${{ needs.context.outputs.version }}
tag_name: ${{ needs.context.outputs.branch }}
generate_release_notes: true