Publish atom-creator #5
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: Publish atom-creator | |
| on: workflow_dispatch | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| # Disabling shallow clone is needed for correctly determining the next release with semantic release | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| architecture: x64 | |
| - name: Restore cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Create maven settings.xml with credentials | |
| uses: whelk-io/maven-settings-xml-action@v22 | |
| with: | |
| servers: | | |
| [ | |
| { "id": "nexus.terrestris.de-releases", "username": "${{ secrets.NEXUS_USER }}", "password": "${{ secrets.NEXUS_PASSWORD }}" }, | |
| { "id": "nexus.terrestris.de-snapshots", "username": "${{ secrets.NEXUS_USER }}", "password": "${{ secrets.NEXUS_PASSWORD }}" }, | |
| { "id": "ghcr.io", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" } | |
| ] | |
| - name: Install dependencies | |
| run: mvn compile --batch-mode | |
| - name: Save cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| - name: Semantic release | |
| id: semantic | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| semantic_version: 23 | |
| extra_plugins: | | |
| @semantic-release/changelog@6 | |
| @terrestris/maven-semantic-release@2 | |
| @semantic-release/git@10 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Save cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |