Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish 3.0.1 as v3.0.1-draft #995

Merged
merged 28 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c01f54d
Set 3.0.1 as draft at this dev moment
bact Jul 18, 2024
31df49a
Add comment on stable release
bact Jul 18, 2024
d217620
Add comment for canonical_version
bact Jul 18, 2024
5d6a925
Reorder arguments
bact Jul 18, 2024
6784d07
Mark the v3.0.1 DRAFT at copyright line
bact Jul 18, 2024
f16ecee
Add site description
bact Jul 18, 2024
ca34ed8
Add comment on 3.0.1 checkout
bact Jul 18, 2024
ab5376d
Add DRAFT mark
bact Jul 18, 2024
869660d
Fix yaml indent
bact Jul 18, 2024
21473f1
Merge branch 'development/v3.0.1' into publish-3.0.1-as-draft
bact Jul 22, 2024
b40dfef
Update mkdocs.yml
bact Jul 24, 2024
326dab2
checkout commit instead of checkout tag
bact Jul 25, 2024
ecb432d
Upgrade to mkdocs 1.6 to fix nav issue
bact Jul 25, 2024
76c597a
Use mkdocs-files.yml for model list
bact Jul 25, 2024
fa6ad0a
Update PR validation to use mkdocs-files.yml
bact Jul 25, 2024
cf1e7ea
Make redirection work for default Ubuntu shell
bact Jul 25, 2024
8dda7f3
Remove trailing space in sed -e expression
bact Jul 25, 2024
39b9d24
Use one-line sed
bact Jul 25, 2024
f21afa4
Use | for sed delimiter instead of /
bact Jul 25, 2024
bb8701e
Use | delimiter in sed
bact Jul 25, 2024
c31bd9a
Use one-line sed with | delimiter
bact Jul 25, 2024
ac3655d
Remove unnecessary temp file
bact Jul 25, 2024
3b20815
Make sed multiple lines
bact Jul 25, 2024
8096542
Insert new line after mkdocs-files.yml
bact Jul 25, 2024
fe4f757
Add blank line between insert and delete expression in sed
bact Jul 25, 2024
6022530
Add mkdocs validation and draft_docs
bact Jul 25, 2024
9dfb3b3
Use enabled_if_env to switch pdf-export
bact Jul 26, 2024
fa9d3d9
Merge branch 'development/v3.0.1' into publish-3.0.1-as-draft
goneall Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions .github/workflows/publish_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ jobs:
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- 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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
repository: spdx/spdx-3-model
ref: main
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
- 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
- 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
Expand All @@ -43,11 +45,32 @@ jobs:
jsonschema \
--output spdx-spec/docs/model/schema.json
- name: Set git identity
run: git config user.name ci-bot; git config user.email [email protected]
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
- name: Build docs
run: mike deploy v3.0.1 latest -b gh-pages -p
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
48 changes: 41 additions & 7 deletions .github/workflows/validate_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,44 @@ jobs:
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install pre-requisites
run: pip install -r requirements.txt
- name: Build
run: mkdocs build -v --clean
- name: Checkout spdx-spec
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
path: spdx-spec
fetch-depth: 1
- name: Checkout spdx-3-model
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
repository: spdx/spdx-3-model
ref: main
path: spdx-3-model
- name: Checkout spec-parser
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
repository: spdx/spec-parser
ref: main
path: spec-parser
- 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: Build the site to validate
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 mkdocs build"
echo "====================="
ENABLE_PDF_EXPORT=0 mkdocs build --clean --config-file "$FINAL_MKDOCS_YML" --verbose
# Build without the time-consuming PDF export
Loading
Loading