Create release notes for version 2.2.0 #3
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: Release Publish | |
| on: | |
| push: | |
| tags: | |
| - "*.*.*" # e.g. 2.2.0 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Derive version from tag | |
| id: rel | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" # e.g. 2.2.0 | |
| VERSION="${TAG}" # e.g. VERSION=2.2.0 | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Set up JDK 23 (generate settings.xml) | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '23' | |
| server-id: github | |
| settings-path: ${{ github.workspace }} | |
| - name: Cache Maven | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| maven-${{ runner.os }}- | |
| - name: Set release version (remove -SNAPSHOT) | |
| run: | | |
| mvn -B -s $GITHUB_WORKSPACE/settings.xml versions:set -DnewVersion="${{ steps.rel.outputs.version }}" -DgenerateBackupPoms=false | |
| grep -m1 '<version>' pom.xml | |
| - name: Deploy Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: mvn -B -s $GITHUB_WORKSPACE/settings.xml -DskipTests deploy | |
| - name: Collect artifacts | |
| run: | | |
| ls -1 target | |
| cp target/*.jar main-artifact.jar || true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: "SingularityLib ${{ steps.rel.outputs.version }}" | |
| generate_release_notes: true | |
| files: | | |
| target/*-sources.jar | |
| target/*-javadoc.jar | |
| main-artifact.jar | |
| - name: Summary | |
| run: echo "Published release ${{ steps.rel.outputs.version }}" |