Release #15
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
java_version: | |
description: Java version to use | |
type: string | |
required: false | |
default: "17" | |
releaseVersion: | |
description: "Version of the release." | |
required: true | |
default: "X.Y.Z" | |
developmentVersion: | |
description: "Version to use for new local working copy." | |
required: true | |
default: "X.Y+1.Z" | |
dryRun: | |
description: "Perform a dry run" | |
required: true | |
default: false | |
type: boolean | |
jobs: | |
maven-release: | |
uses: jqassistant-tooling/jqassistant-github-actions/.github/workflows/release.yml@main | |
with: | |
releaseVersion: ${{ github.event.inputs.releaseVersion }} | |
developmentVersion: "${{ github.event.inputs.developmentVersion }}-SNAPSHOT" | |
dryRun: ${{ github.event.inputs.dryRun }} | |
secrets: | |
ossrh_username: ${{ secrets.OSSRH_USERNAME }} | |
ossrh_password: ${{ secrets.OSSRH_PASSWORD }} | |
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} | |
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }} | |
sonar_token: ${{ secrets.SONAR_TOKEN }} | |
npm-release: | |
needs: [ maven-release ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js (LTS) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Update package.json to release version | |
working-directory: ./typescript | |
run: npm version ${{ github.event.inputs.releaseVersion }} --allow-same-version --no-git-tag-version | |
- name: Install dependencies | |
working-directory: ./typescript | |
run: npm install | |
- name: Build package | |
working-directory: ./typescript | |
run: npm run build | |
- name: Publish package | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: ./typescript | |
- name: Publish Versioned Quartz GitHub Pages | |
uses: RelativeProgramming/versioned-quartz-gh-pages-deploy@v1.0.0 | |
with: | |
quartz-repo: 'jqassistant-tooling/jqassistant-quartz-docs' | |
deployment-version: ${{ github.event.inputs.releaseVersion }} | |
- name: Update package.json to development version | |
working-directory: ./typescript | |
run: | | |
npm version ${{ github.event.inputs.developmentVersion }} --no-git-tag-version | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git commit -a -m "Updated package.json to development version" | |
git push |