Skip to content

chore(build): use sass dependency instead of abandonned node-sass package #54

chore(build): use sass dependency instead of abandonned node-sass package

chore(build): use sass dependency instead of abandonned node-sass package #54

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-22.04
outputs:
app_version: ${{steps.get-app-version.outputs.APP_VERSION}}
steps:
- uses: actions/checkout@v4
- uses: Keeper-Security/ksm-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |
${{ vars.KEEPER_OSSRH_RECORD_ID }}/field/login > env:MAVEN_USERNAME
${{ vars.KEEPER_OSSRH_RECORD_ID }}/field/password > env:MAVEN_PASSWORD
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/custom_field/gpg-private-key > env:GPG_PRIVATE_KEY
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/field/password > env:MAVEN_GPG_PASSPHRASE
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
server-id: 'ossrh'
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ env.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- id: get-app-version
name: Get archetype version
run: echo "APP_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT
- name: Build and test archetype
run: ./mvnw -B -ntp clean package
- name: Upload archetype for tests
uses: actions/upload-artifact@v4
with:
name: latest-snapshot
path: target/bonita-theme-archetype-*
- name: Upload archetype pom for tests
uses: actions/upload-artifact@v4
with:
name: latest-snapshot-pom
path: pom.xml
test:
strategy:
matrix:
platform: [ubuntu-22.04, macos-12, windows-2022]
runs-on: ${{ matrix.platform }}
needs: build
steps:
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Download latest archetype snapshot
uses: actions/download-artifact@v4
with:
name: latest-snapshot
- name: Download archetype pom
uses: actions/download-artifact@v4
with:
name: latest-snapshot-pom
- name: Display structure of downloaded files
run: ls -R
- name: Install latest archetype in local repo
shell: bash
run: mvn -B -ntp install:install-file -Dfile=bonita-theme-archetype-${{needs.build.outputs.app_version}}.jar -DpomFile=pom.xml && rm pom.xml
- name: Generate project and build it
shell: bash
run: >-
mvn -B -ntp archetype:generate
-DarchetypeGroupId=org.bonitasoft.archetypes
-DarchetypeArtifactId=bonita-theme-archetype
-DarchetypeVersion=${{needs.build.outputs.app_version}}
-DgroupId=org.bonita.test.theme
-DartifactId=test-theme
-Dversion=1.0.0-SNAPSHOT
-Dname=myTheme
-DdisplayName="My Theme"
- name: Build and test generated project
shell: bash
run: mvn -B -ntp verify -f test-theme/pom.xml