-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.87 KB
/
publish-samples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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@v2
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@v4
with:
path: 'schema'
- name: Check out 'JDF Specificaion'...
uses: actions/checkout@v4
with:
repository: 'cip4/JDF-Specification'
token: ${{ steps.access_token.outputs.token }}
path: 'spec'
- name: Check out 'Sample Builder'...
uses: actions/checkout@v4
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 "infrastructure@cip4.org"
git config --global user.name "R2D2"
git add --all
git commit -m "Update XJDF Samples"
git push
working-directory: ./spec