Skip to content

JDF-1112 Update to new versions after release. #261

JDF-1112 Update to new versions after release.

JDF-1112 Update to new versions after release. #261

Workflow file for this run

# This is the basic workflow to build draft documentation
# !NOTE:
# This build produces multiple versions of this document!!
name: Snapshot Build
# The VERSION is the main release number i.e. 1.8 or 2.1
env:
# Common to all builds
BUILD_NAME: JDF-SPECIFICATION
# 'BOTH' parameters
BOTH_DOCUMENT_VERSION: '1.9+2.3'
BOTH_DOCUMENT_COVER_TITLE: BOTH Specifications
BOTH_CONFIG_FILE: Build\BOTH_Specifications.ini
BOTH_CONFLUENCE_LABELS: 'both-specification,spec-draft'
# 'JDF' parameters
JDF_DOCUMENT_VERSION: '1.9'
JDF_DOCUMENT_COVER_TITLE: JDF Specification
JDF_CONFIG_FILE: Build\JDF_Specification.ini
JDF_CONFLUENCE_LABELS: 'jdf-specification,spec-draft'
# 'XJDF' parameters
XJDF_DOCUMENT_VERSION: '2.3'
XJDF_DOCUMENT_COVER_TITLE: XJDF Specification
XJDF_CONFIG_FILE: Build\XJDF_Specification.ini
XJDF_CONFLUENCE_LABELS: 'xjdf-specification,spec-draft'
# Same ID for all builds
CONFLUENCE_ID: '1560313992'
DOCUMENT_METADATA_COPYRIGHT: 'CIP4 Organization, all rights reserved'
DOCUMENT_BOTH_METADATA_TITLE: 'BOTH Specifications'
DOCUMENT_JDF_METADATA_TITLE: 'JDF Specification'
DOCUMENT_XJDF_METADATA_TITLE: 'XJDF Specification'
BUILD_UTILITY_EXE: c:\actions-runner\_work\_tool\document-processing\document-processing.exe
## The remaining section is based upon those common to all draft documentation builds
## It has been modified to allow for three slightly different builds.
# Controls when the action will run
on:
push:
branches: [ master ]
workflow_dispatch:
inputs:
tags:
description: 'Manual Run'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_both:
runs-on: [framemaker-2020]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# For access to other Git repositories - an access token is required.
- 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 }}
# Clean up working directory
- name: Clean up working directory
run: rm -r -fo *
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source
uses: actions/checkout@v2
with:
path: document
# Check out the build scripts
- name: Checkout build scripts
uses: actions/checkout@v2
with:
repository: cip4/cip4-document-builder
token: ${{ steps.access_token.outputs.token }}
path: builder
# Build the document parameters
- name: Build Document
timeout-minutes: 45
run: >
python ..\builder\scripts\specbuilder.py $env:BOTH_CONFIG_FILE
"$env:BOTH_DOCUMENT_COVER_TITLE $env:BOTH_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:BOTH_DOCUMENT_COVER_TITLE"
"Version $env:BOTH_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:DOCUMENT_BOTH_METADATA_TITLE $env:BOTH_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:BOTH_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$((Get-Date).ToString('MMMM yyyy')) $env:DOCUMENT_METADATA_COPYRIGHT"
"2000-$((Get-Date).ToString('yyyy'))"
"Run-$env:GITHUB_RUN_NUMBER"
working-directory: ./document
# Mark pages with draft watermark
- name: Watermark pages
run: >
${{ env.BUILD_UTILITY_EXE }} draft "$env:BOTH_DOCUMENT_COVER_TITLE*.pdf"
working-directory: ./document/target
# Upload any artefact produced.
- name: Upload Document
uses: actions/upload-artifact@v2
with:
name: ${{ env.BUILD_NAME }}-artifact
path: document/target/*.pdf
# Upload to Confluence
- name: Confluence Upload
uses: cip4/action-confluence-upload@master
with:
url: 'https://cip4.atlassian.net/wiki'
username: ${{ secrets.ATLASSIAN_USER }}
password: ${{ secrets.ATLASSIAN_TOKEN }}
contentId: ${{ env.CONFLUENCE_ID }}
label: ${{ env.BOTH_CONFLUENCE_LABELS }}
filePattern: 'document/target/*.pdf'
build_jdf:
runs-on: [framemaker-2020]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# For access to other Git repositories - an access token is required.
- 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 }}
# Clean up working directory
- name: Clean up working directory
run: rm -r -fo *
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source
uses: actions/checkout@v2
with:
path: document
# Check out the build scripts
- name: Checkout build scripts
uses: actions/checkout@v2
with:
repository: cip4/cip4-document-builder
token: ${{ steps.access_token.outputs.token }}
path: builder
# Build the document parameters
- name: Build Document
timeout-minutes: 45
run: >
python ..\builder\scripts\specbuilder.py $env:JDF_CONFIG_FILE
"$env:JDF_DOCUMENT_COVER_TITLE $env:JDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:JDF_DOCUMENT_COVER_TITLE"
"Version $env:JDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:DOCUMENT_JDF_METADATA_TITLE $env:JDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:JDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$((Get-Date).ToString('MMMM yyyy')) $env:DOCUMENT_METADATA_COPYRIGHT"
"2000-$((Get-Date).ToString('yyyy'))"
"Run-$env:GITHUB_RUN_NUMBER"
working-directory: ./document
# Mark pages with draft watermark
- name: Watermark pages
run: >
${{ env.BUILD_UTILITY_EXE }} draft "$env:JDF_DOCUMENT_COVER_TITLE*.pdf"
working-directory: ./document/target
# Upload any artefact produced.
- name: Upload Document
uses: actions/upload-artifact@v2
with:
name: ${{ env.BUILD_NAME }}-artifact
path: document/target/*.pdf
# Upload to Confluence
- name: Confluence Upload
uses: cip4/action-confluence-upload@master
with:
url: 'https://cip4.atlassian.net/wiki'
username: ${{ secrets.ATLASSIAN_USER }}
password: ${{ secrets.ATLASSIAN_TOKEN }}
contentId: ${{ env.CONFLUENCE_ID }}
label: ${{ env.JDF_CONFLUENCE_LABELS }}
filePattern: 'document/target/*.pdf'
build_xjdf:
runs-on: [framemaker-2020]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# For access to other Git repositories - an access token is required.
- 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 }}
# Clean up working directory
- name: Clean up working directory
run: rm -r -fo *
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source
uses: actions/checkout@v2
with:
path: document
# Check out the build scripts
- name: Checkout build scripts
uses: actions/checkout@v2
with:
repository: cip4/cip4-document-builder
token: ${{ steps.access_token.outputs.token }}
path: builder
# Build the document parameters
- name: Build Document
timeout-minutes: 45
run: >
python ..\builder\scripts\specbuilder.py $env:XJDF_CONFIG_FILE
"$env:XJDF_DOCUMENT_COVER_TITLE $env:XJDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:XJDF_DOCUMENT_COVER_TITLE"
"Version $env:XJDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:DOCUMENT_XJDF_METADATA_TITLE $env:XJDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$env:XJDF_DOCUMENT_VERSION Draft $((Get-Date).ToString('yyyyMMdd')) Build-$env:GITHUB_RUN_NUMBER"
"$((Get-Date).ToString('MMMM yyyy')) $env:DOCUMENT_METADATA_COPYRIGHT"
"2000-$((Get-Date).ToString('yyyy'))"
"Run-$env:GITHUB_RUN_NUMBER"
working-directory: ./document
# Mark pages with draft watermark
- name: Watermark pages
run: >
${{ env.BUILD_UTILITY_EXE }} draft "$env:XJDF_DOCUMENT_COVER_TITLE*.pdf"
working-directory: ./document/target
# Upload any artefact produced.
- name: Upload Document
uses: actions/upload-artifact@v2
with:
name: ${{ env.BUILD_NAME }}-artifact
path: document/target/*.pdf
# Upload to Confluence
- name: Confluence Upload
uses: cip4/action-confluence-upload@master
with:
url: 'https://cip4.atlassian.net/wiki'
username: ${{ secrets.ATLASSIAN_USER }}
password: ${{ secrets.ATLASSIAN_TOKEN }}
contentId: ${{ env.CONFLUENCE_ID }}
label: ${{ env.XJDF_CONFLUENCE_LABELS }}
filePattern: 'document/target/*.pdf'