Iterate dist management cfg #11
Workflow file for this run
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: Executes process associated with release. | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: [ "release-workflow" ] | |
| #on: | |
| # release: | |
| # types: [published] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Parses version number appropriately. | |
| - name: Parser | |
| id: parser | |
| uses: johngeorgewright/parse-version-action@v2.0.0 | |
| with: | |
| ref: refs/tags/v0.0.1-test01 | |
| trim-start: v | |
| # Now, build the code. | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| server-id: central # Maps to central-publishing-maven-plugin config. | |
| # Maps to GitHub repository secret names. | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_CENTRAL_TOKEN | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Adjust the version to the release | |
| run: mvn -B versions:set -DnewVersion=${{ steps.parser.outputs.version }} --file pom.xml | |
| - name: Build and deploy with Maven | |
| run: mvn -B deploy -Ppublish --file pom.xml | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| - name: Deploy javadoc to Github Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: java-client/target/apidocs | |
| force_orphan: true | |