Skip to content

Release/v1.15.3

Release/v1.15.3 #44

Workflow file for this run

name: Deploy
on:
pull_request:
branches: [ "main" ]
types: [ closed ]
env:
DOCS_FOLDER: docs
jobs:
deploy:
if: github.event.pull_request.merged
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pages: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Free Disk Space
shell: bash
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: 21
distribution: temurin
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Get Spectrum new version
id: get-version
run: |
NEW_VERSION=${GITHUB_HEAD_REF#release/v}
echo "Spectrum version is $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Bump Spectrum version
shell: bash
run: ./mvnw versions:set-property -Dmaven.plugin.validation=NONE -DgenerateBackupPoms=false -Dproperty=revision -DnewVersion=$NEW_VERSION -ntp
- id: install-secret-key
name: Install gpg secret key
run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./mvnw deploy -DskipTests -Dmaven.plugin.validation=NONE -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -ntp
- name: Generate new public Json Schema
shell: bash
run: ./mvnw install -Dmaven.plugin.validation=NONE -DskipSign -ntp -P framework-only
- name: Commit files and generate new tag
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -a -m "Bumping Spectrum version to $NEW_VERSION"
git tag v$NEW_VERSION
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
tags: true
atomic: true
- name: Merge on develop
run: |
export GIT_MERGE_AUTOEDIT=no
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout develop
git merge main
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: develop
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
jacoco-csv-file: ${{ env.DOCS_FOLDER }}/jacoco/jacoco.csv
branches-label: Branches
badges-directory: ${{ env.DOCS_FOLDER }}/badges
intervals: 95 87.5 75 67.5 60 0
fail-if-coverage-less-than: 0.9
fail-if-branches-less-than: 0.9
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branches = ${{ steps.jacoco.outputs.branches }}"
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ${{ env.DOCS_FOLDER }}/
destination: ./_site
- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4