updated release to 8.1.4 (mock) #161
This file contains hidden or 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: Release Activiti Cloud | |
on: | |
push: | |
branches: ['releases/main/**'] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
load-release-info: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.load-descriptor.outputs.version }} | |
next-version: ${{ steps.load-descriptor.outputs.next-version }} | |
notes-start-tag: ${{ steps.load-descriptor.outputs.notes-start-tag }} | |
mock: ${{ steps.load-descriptor.outputs.mock }} | |
activiti-tag: ${{ steps.load-descriptor.outputs.activiti-tag }} | |
activiti-cloud-tag: ${{ steps.load-descriptor.outputs.activiti-cloud-tag }} | |
common-chart-tag: ${{ steps.load-descriptor.outputs.common-chart-tag }} | |
full-chart-tag: ${{ steps.load-descriptor.outputs.full-chart-tag }} | |
staging-repository: ${{ steps.load-descriptor.outputs.staging-repository }} | |
steps: | |
- name: Installing activiti-scripts | |
uses: actions/checkout@v3 | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
id: load-descriptor | |
with: | |
release-descriptor: release.yaml | |
release-activiti: | |
runs-on: ubuntu-latest | |
needs: [load-release-info] | |
outputs: | |
staging-repository: ${{ steps.staging.outputs.staging-repository }} | |
steps: | |
- name: create-staging-repository | |
id: staging | |
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
staging-description: Activiti staging ${{ needs.load-release-info.outputs.version }} | |
nexus-profile-id: ${{ secrets.NEXUS_ACTIVITI7_PROFILE_ID }} | |
nexus-username: ${{ secrets.NEXUS_USERNAME }} | |
nexus-password: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Checkout activiti-scripts | |
uses: actions/checkout@v3 | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
repo: Activiti/Activiti | |
base-ref: ${{ needs.load-release-info.outputs.activiti-tag }} | |
release-version: ${{ needs.load-release-info.outputs.version }} | |
staging-repository: ${{ steps.staging.outputs.staging-repository }} | |
git-username: ${{ secrets.BOT_GITHUB_USERNAME }} | |
github-token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
gpg-passphrase: "${{ secrets.GPG_PASSPHRASE }}" | |
gpg-secret-keys: "${{ secrets.GPG_SECRET_KEYS }}" | |
gpg-owner-trust: "${{ secrets.GPG_OWNERTRUST }}" | |
nexus-username: "${{ secrets.NEXUS_USERNAME }}" | |
nexus-password: "${{ secrets.NEXUS_PASSWORD }}" | |
java-distribution: "temurin" | |
java-version: "17" | |
create-scripts-tag: | |
runs-on: ubuntu-latest | |
needs: | |
- load-release-info | |
- release-activiti | |
env: | |
RELEASE_VERSION: ${{ needs.load-release-info.outputs.version }} | |
steps: | |
- name: Checkout activiti-scripts | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
id: check-tag | |
with: | |
tag: ${{ env.RELEASE_VERSION }} | |
- name: Update staging repository | |
env: | |
STAGING_REPOSITORY_FILE: maven-config/staging-repository.txt | |
STAGING_REPOSITORY_ID: ${{ needs.release-activiti.outputs.staging-repository }} | |
run: | | |
echo "$STAGING_REPOSITORY_ID" > "$STAGING_REPOSITORY_FILE" | |
yq -i e '.release.stagingRepository = env(STAGING_REPOSITORY_ID)' release.yaml | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
with: | |
username: ${{ secrets.BOT_GITHUB_USERNAME }} | |
add-options: maven-config/staging-repository.txt release.yaml | |
commit-message: Add staging repository for ${{env.RELEASE_VERSION}} | |
- name: Create tag | |
if: steps.check-tag.outputs.exists == 'false' | |
run: | | |
git tag "$RELEASE_VERSION" -m "Release version $RELEASE_VERSION" | |
git push origin "$RELEASE_VERSION" | |
promote-nexus-staging: | |
runs-on: ubuntu-latest | |
needs: | |
- load-release-info | |
- release-activiti | |
- create-scripts-tag | |
steps: | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
if: needs.load-release-info.outputs.mock != 'true' | |
with: | |
version: ${{ needs.load-release-info.outputs.version }} | |
staging-repository: ${{ needs.release-activiti.outputs.staging-repository}} | |
nexus-username: ${{ secrets.NEXUS_USERNAME }} | |
nexus-password: ${{ secrets.NEXUS_PASSWORD }} | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
if: needs.load-release-info.outputs.mock != 'true' | |
with: | |
version: ${{ needs.load-release-info.outputs.version }} | |
staging-repository: ${{ needs.release-activiti.outputs.staging-repository}} | |
nexus-username: ${{ secrets.NEXUS_USERNAME }} | |
nexus-password: ${{ secrets.NEXUS_PASSWORD }} | |
create-gh-releases: | |
runs-on: ubuntu-latest | |
needs: | |
- load-release-info | |
- promote-nexus-staging | |
strategy: | |
fail-fast: true | |
matrix: | |
repo: | |
- Activiti | |
- activiti-cloud | |
- activiti-cloud-common-chart | |
- activiti-cloud-full-chart | |
env: | |
VERSION: ${{ needs.load-release-info.outputs.version }} | |
NOTES_START_TAG: ${{ needs.load-release-info.outputs.notes-start-tag }} | |
REPO_DIR: repos/${{ matrix.repo }} | |
IS_MOCK: ${{ needs.load-release-info.outputs.mock }} | |
steps: | |
- name: Enable Draft | |
if: ${{ env.IS_MOCK == 'true' }} | |
run: | | |
echo GH_RN_DRAFT="--draft" >> $GITHUB_ENV | |
- name: Create Github release for ${{ matrix.repo }} | |
env: | |
GITHUB_REPO: Activiti/${{ matrix.repo }} | |
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} | |
run: | | |
gh release create $VERSION --generate-notes --repo $GITHUB_REPO --notes-start-tag $NOTES_START_TAG $GH_RN_DRAFT |