3.0 -> 3.0.1 #36
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: | |
- development/v3.0.1 | |
repository_dispatch: | |
types: | |
- publish_v3_spec | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | |
with: | |
ref: development/v3.0.1 | |
path: spdx-spec | |
fetch-depth: 0 # Because we will be pushing the gh-pages branch | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | |
with: | |
repository: spdx/spec-parser | |
ref: main | |
path: spec-parser | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | |
with: | |
repository: spdx/spdx-3-model | |
ref: main # for v3.0.1-draft, checkout latest from main (development) | |
# Once 3.0.1 released, use the following ref to checkout from the release tag | |
# ref: 3.0.1 # for v3.0.1 final release | |
path: spdx-3-model | |
- name: Install pre-requisites for spdx-spec | |
run: pip install -r spdx-spec/requirements.txt | |
- name: Install pre-requisites for spec-parser | |
run: pip install -r spec-parser/requirements.txt | |
- name: Build model files | |
run: python3 spec-parser/main.py spdx-3-model/model spdx-spec/docs/model | |
- name: Copy JSON annotations | |
run: cp spdx-spec/serialization/jsonld/annotations.ttl spdx-spec/docs/model/jsonld-annotations.ttl | |
- name: Generate JSON schema | |
run: | | |
shacl2code generate \ | |
--input spdx-spec/docs/model/spdx-model.ttl \ | |
--input spdx-spec/docs/model/jsonld-annotations.ttl \ | |
--context-url spdx-spec/docs/model/spdx-context.jsonld https://spdx.org/rdf/3.0.1/spdx-context.jsonld \ | |
jsonschema \ | |
--output spdx-spec/docs/model/schema.json | |
- name: Set git identity | |
working-directory: spdx-spec | |
run: git config user.name ci-bot; git config user.email [email protected] | |
- name: Sync gh-pages | |
working-directory: spdx-spec | |
run: git checkout gh-pages && git pull && git checkout development/v3.0.1 | |
- name: Build docs and set aliases | |
working-directory: spdx-spec | |
run: | | |
MODEL_YML="docs/model/mkdocs-files.yml" | |
BASE_MKDOCS_YML="mkdocs.yml" | |
FINAL_MKDOCS_YML="mkdocs-final.yml" | |
echo "Build $FINAL_MKDOCS_YML from $BASE_MKDOCS_YML and $MODEL_YML" | |
sed -e "\|- model.*#.*[MODEL_PLACEHOLDER].*|{ | |
r $MODEL_YML | |
a\\ | |
d | |
}" "$BASE_MKDOCS_YML" > "$FINAL_MKDOCS_YML" | |
echo "=====================" | |
echo "Start mike deploy" | |
echo "=====================" | |
mike deploy --update-aliase --config-file "$FINAL_MKDOCS_YML" --branch gh-pages --push v3.0.1-draft | |
# Once 3.0.1 released, use the following command to deploy 3.0.1 as latest version | |
# mike deploy --update-aliase --config-file "$FINAL_MKDOCS_YML" --branch gh-pages --push v3.0.1 latest | |
- name: Set default version | |
working-directory: spdx-spec | |
run: mike set-default v3.0 | |
# Once 3.0.1 released, use the following command to set 3.0.1 as default version | |
# run: mike set-default v3.0.1 |