mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2026-09-09 18:03:59 +00:00
ACS-12085 Migrate SDK Repositories Verified Commits
This commit is contained in:
@@ -13,6 +13,9 @@ on:
|
||||
- feature/**
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
JAVA_VERSION: '21'
|
||||
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||
@@ -138,16 +141,66 @@ jobs:
|
||||
- name: "Build"
|
||||
run: mvn clean install -B ${{ matrix.suite }}
|
||||
|
||||
release:
|
||||
name: "Release"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
needs: [tests]
|
||||
outputs:
|
||||
release_tag: ${{ steps.versions.outputs['release-version'] }}
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||
if: >
|
||||
!(failure() || cancelled()) &&
|
||||
(github.ref_name == 'master' || startsWith(github.ref_name, 'fix/') || startsWith(github.ref_name, 'feature/')) &&
|
||||
!contains(github.event.head_commit.message, '[no release]') &&
|
||||
github.event_name != 'pull_request' &&
|
||||
contains(github.event.head_commit.message, '[release]')
|
||||
steps:
|
||||
- name: "Generate GitHub App token"
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
with:
|
||||
client-id: ${{ vars.GH_APP_ENGINEERING_CONTRIB_CLIENT_ID }}
|
||||
private-key: ${{ secrets.GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
persist-credentials: true
|
||||
fetch-depth: 0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v18.21.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v18.21.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v18.21.0
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/maven-compute-release-versions@v18.21.0
|
||||
id: versions
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/maven-release-slim@v18.21.0
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
release-version: ${{ steps.versions.outputs['release-version'] }}
|
||||
development-version: ${{ steps.versions.outputs['next-development-version'] }}
|
||||
maven-args: >
|
||||
-DskipTests
|
||||
-DbuildNumber=${{ github.run_number }}
|
||||
|
||||
check_version:
|
||||
name: "Check version"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [tests]
|
||||
needs: [tests, release]
|
||||
if: >
|
||||
contains(github.event.head_commit.message, '[publish]')
|
||||
contains(github.event.head_commit.message, '[publish]') &&
|
||||
!cancelled() &&
|
||||
(needs.release.result == 'success' || needs.release.result == 'skipped')
|
||||
outputs:
|
||||
is_ga: ${{ steps.publish_version.outputs.is_ga }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ needs.release.outputs.release_tag || github.ref }}
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v15.7.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v15.7.1
|
||||
with:
|
||||
@@ -167,13 +220,18 @@ jobs:
|
||||
publish:
|
||||
name: "Publish artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [tests, check_version]
|
||||
needs: [tests, check_version, release]
|
||||
if: >
|
||||
contains(github.event.head_commit.message, '[publish]') && needs.check_version.outputs.is_ga == 'true'
|
||||
contains(github.event.head_commit.message, '[publish]') &&
|
||||
needs.check_version.outputs.is_ga == 'true' &&
|
||||
!cancelled() &&
|
||||
(needs.release.result == 'success' || needs.release.result == 'skipped')
|
||||
env:
|
||||
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ needs.release.outputs.release_tag || github.ref }}
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v15.7.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v15.7.1
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user