|
12 | 12 | required: true |
13 | 13 | default: "X.Y.Z-SNAPSHOT" |
14 | 14 | jobs: |
15 | | - release-maven: |
16 | | - runs-on: 'ubuntu-latest' |
17 | | - steps: |
18 | | - - name: Print github context |
19 | | - env: |
20 | | - GITHUB_CONTEXT: ${{ toJSON(github) }} |
21 | | - run: echo "$GITHUB_CONTEXT" |
22 | | - - uses: actions/checkout@v4 |
23 | | - with: |
24 | | - fetch-depth: 0 |
25 | | - submodules: recursive |
26 | | - - name: Set up Java for publishing to Maven Central Repository OSS |
27 | | - uses: actions/setup-java@v4 |
28 | | - with: |
29 | | - java-version: '8' |
30 | | - distribution: 'zulu' |
31 | | - server-id: ossrh |
32 | | - server-username: MAVEN_USERNAME |
33 | | - server-password: MAVEN_PASSWORD |
34 | | - - name: Cache Maven packages |
35 | | - uses: actions/cache@v4 |
36 | | - with: |
37 | | - path: ~/.m2/repository |
38 | | - key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }} |
39 | | - restore-keys: ${{ runner.os }}-m2-repository |
40 | | - - name: Install gpg secret key |
41 | | - env: |
42 | | - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
43 | | - if: ${{ env.GPG_PRIVATE_KEY!=''}} |
44 | | - run: | |
45 | | - cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import |
46 | | - gpg --list-secret-keys --keyid-format LONG |
47 | | - git config --global user.signingkey B02611B009E5302EB58D102D6C2EDF3C90D33841 |
48 | | - - name: Configure Git User |
49 | | - run: | |
50 | | - git config --global user.name "Open Identity Platform Community" |
51 | | - git config --global user.email "open-identity-platform-opendj@googlegroups.com" |
52 | | - - name: Release and publish to the Maven Central Repository |
53 | | - env: |
54 | | - GITHUB_ACTOR: ${{ github.actor }} |
55 | | - GITHUB_TOKEN: ${{ github.token }} |
56 | | - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} |
57 | | - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} |
58 | | - MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10 |
59 | | - if: ${{ env.MAVEN_USERNAME!='' && env.MAVEN_PASSWORD!='' }} |
60 | | - run: mvn --batch-mode -Darguments="-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}" -DsignTag=true -DtagNameFormat="${{ github.event.inputs.releaseVersion }}" -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} release:prepare release:perform --file pom.xml |
61 | | - - name: Release on GitHub |
62 | | - uses: softprops/action-gh-release@v2 |
63 | | - with: |
64 | | - name: ${{ github.event.inputs.releaseVersion }} |
65 | | - tag_name: ${{ github.event.inputs.releaseVersion }} |
66 | | - draft: false |
67 | | - prerelease: false |
68 | | - fail_on_unmatched_files: false |
69 | | - generate_release_notes: true |
70 | | - files: | |
71 | | - openam-distribution/openam-distribution-kit/target/*.zip |
72 | | - openam-distribution/openam-distribution-ssoconfiguratortools/target/*.zip |
73 | | - openam-distribution/openam-distribution-fedlet-unconfigured/target/*.zip |
74 | | - openam-distribution/openam-distribution-ssoadmintools/target/*.zip |
75 | | - openam-console/target/*.war |
76 | | - openam-server/target/*.war |
77 | | - openam-server-only/target/*.war |
78 | | - openam-distribution/openam-distribution-fedlet-unconfigured/target/*.war |
79 | | - openam-distribution/openam-distribution-docker/target/Dockerfile* |
80 | | - - uses: actions/checkout@v4 |
81 | | - continue-on-error: true |
82 | | - with: |
83 | | - repository: ${{ github.repository }}.wiki |
84 | | - path: ${{ github.event.repository.name }}.wiki |
85 | | - fetch-depth: 0 |
86 | | - - name: Publish docs to wiki |
87 | | - continue-on-error: true |
88 | | - shell: bash |
89 | | - env: |
90 | | - GITHUB_ACTOR: ${{ github.actor }} |
91 | | - GITHUB_TOKEN: ${{ github.token }} |
92 | | - run: | |
93 | | - cd ${{ github.event.repository.name }}.wiki |
94 | | - rm -rf asciidoc |
95 | | - mkdir asciidoc |
96 | | - cp -R ../openam-documentation/openam-doc-source/target/asciidoc/pdf ../${{ github.event.repository.name }}.wiki/asciidoc |
97 | | - git add -A |
98 | | - git commit -a -m "upload docs after release ${{ github.event.inputs.releaseVersion }}" |
99 | | - git tag -f ${{ github.event.inputs.releaseVersion }} |
100 | | - git push --quiet --force |
101 | | - git push --quiet --force origin ${{ github.event.inputs.releaseVersion }} |
102 | | -
|
103 | | - - uses: actions/checkout@v4 |
104 | | - continue-on-error: true |
105 | | - with: |
106 | | - repository: OpenIdentityPlatform/doc.openidentityplatform.org |
107 | | - path: doc.openidentityplatform.org |
108 | | - token: ${{ secrets.OIP_PAT_GH_TOKEN }} |
109 | | - - name: Publish docs to site |
110 | | - continue-on-error: true |
111 | | - shell: bash |
112 | | - run: | |
113 | | - export REPO_NAME_LC=$(echo '${{github.event.repository.name}}' | tr '[:upper:]' '[:lower:]') |
114 | | - export TAG_NAME='${{github.event.repository.name}}-${{ github.event.inputs.releaseVersion }}' |
115 | | - cd doc.openidentityplatform.org |
116 | | - git tag -f ${TAG_NAME} |
117 | | - git push --quiet --force origin ${TAG_NAME} |
118 | | -
|
119 | 15 | release-docker: |
120 | 16 | runs-on: 'ubuntu-latest' |
121 | | - needs: |
122 | | - - release-maven |
123 | 17 | steps: |
124 | 18 | - uses: actions/checkout@v4 |
125 | 19 | with: |
|
165 | 59 | labels: ${{ steps.meta.outputs.labels }} |
166 | 60 | release-docker-alpine: |
167 | 61 | runs-on: 'ubuntu-latest' |
168 | | - needs: |
169 | | - - release-maven |
170 | 62 | steps: |
171 | 63 | - uses: actions/checkout@v4 |
172 | 64 | with: |
|
0 commit comments