Skip to content

JDF-1139

JDF-1139 #87

name: Publish XJDF Samples
on:
push:
branches: [ main ]
jobs:
publish-samples:
runs-on: windows-latest
steps:
- name: Get GitHub Access Token
id: access_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.CIP4_GITHUB_ACTIONS_APP_ID }}
private_key: ${{ secrets.CIP4_GITHUB_ACTIONS_APP_KEY }}
- name: Check out 'XJDF Schema'...
uses: actions/checkout@v3
with:
path: 'schema'
- name: Check out 'JDF Specificaion'...
uses: actions/checkout@v3
with:
repository: 'cip4/JDF-Specification'
token: ${{ steps.access_token.outputs.token }}
path: 'spec'
- name: Check out 'Sample Builder'...
uses: actions/checkout@v3
with:
repository: 'cip4/cip4-sample-builder'
token: ${{ steps.access_token.outputs.token }}
path: 'cip4-sample-builder'
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: Generate XJDF Samples
run: ./gradlew.bat --include-build ../cip4-sample-builder clean buildSamples --no-daemon
working-directory: ./schema
- name: Replace XJDF Samples in Specification
run: |
rm -r -fo spec\FrameMaker\Examples\xjdf
move schema\build\generated-samples spec\FrameMaker\Examples\xjdf
- name: Add Version Details
run: echo build $env:GITHUB_RUN_NUMBER > version.txt
working-directory: ./spec/FrameMaker/Examples/xjdf
- name: Push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "R2D2"
git add --all
git commit -m "Update XJDF Samples"
git push
working-directory: ./spec