feat: add copilot instructions for security, PII, and license complia… #99
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: Pre Release and Deploy API Jars to Artifactory | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - commons/** | |
| branches: | |
| - main ***REMOVED*** or master or release branches | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up git user | |
| uses: fregante/setup-git-user@v2 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Configure Maven settings.xml for Artifactory | |
| run: | | |
| mkdir -p ~/.m2 | |
| cat <<EOF > ~/.m2/settings.xml | |
| <settings> | |
| <servers> | |
| <server> | |
| <id>data-viz-release</id> | |
| <username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
| <password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
| </server> | |
| <server> | |
| <id>data-viz-snapshot</id> | |
| <username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
| <password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
| </server> | |
| </servers> | |
| </settings> | |
| EOF | |
| - name: Build and Deploy Parent | |
| run: mvn clean deploy --batch-mode | |
| - name: Build and Deploy | |
| working-directory: ./commons | |
| run: mvn clean deploy --batch-mode | |
| - name: Check for SNAPSHOT versions | |
| id: check_snapshot | |
| run: | | |
| VERSIONS=$(mvn -q --also-make exec:exec -Dexec.executable="echo" -Dexec.args='${project.version}') | |
| echo "All module versions:" | |
| echo "$VERSIONS" | |
| SNAPSHOT_COUNT=$(echo "$VERSIONS" | grep -c "SNAPSHOT" || echo "0") | |
| if [ "$SNAPSHOT_COUNT" -gt 0 ]; then | |
| echo "has_snapshot=true" >> $GITHUB_OUTPUT | |
| echo "✓ Found $SNAPSHOT_COUNT SNAPSHOT version(s), will proceed with release" | |
| else | |
| echo "has_snapshot=false" >> $GITHUB_OUTPUT | |
| echo "✗ No SNAPSHOT versions found, skipping release" | |
| fi | |
| - name: Prepare Maven Release | |
| if: steps.check_snapshot.outputs.has_snapshot == 'true' | |
| run: mvn release:prepare --batch-mode | |
| - name: Perform Maven Release | |
| if: steps.check_snapshot.outputs.has_snapshot == 'true' | |
| run: | | |
| ***REMOVED*** Get current version from pom.xml | |
| CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "Current version: $CURRENT_VERSION" | |
| ***REMOVED*** Remove -SNAPSHOT and calculate next version | |
| VERSION=${CURRENT_VERSION%-SNAPSHOT} | |
| IFS='.' read -r major minor patch <<< "$VERSION" | |
| NEXT_VERSION="$major.$minor.$((patch + 1))-SNAPSHOT" | |
| ***REMOVED*** Perform release | |
| mvn -B release:prepare release:perform \ | |
| -DreleaseVersion=$VERSION \ | |
| -DdevelopmentVersion=$NEXT_VERSION \ | |
| -DtagNameFormat=v@{project.version} \ | |
| -DpushChanges=true \ | |
| -DlocalCheckout=true \ | |
| -DpreparationGoals="clean verify -Dcheckstyle.skip" \ | |
| -Dgoals=deploy \ | |
| -DskipTests | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Released version $VERSION" |