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

Don't override VERSION and REVMARK for default actions builds #73

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Changes from all commits
Commits
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
30 changes: 19 additions & 11 deletions .github/workflows/build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ on:
revision_mark:
description: 'Set revision mark as Draft, Release or Stable:'
required: true
type: string
type: choice
options:
- Draft
- Release
- Stable
default: Draft
prerelease:
description: Tag as a pre-release?
Expand All @@ -39,24 +43,28 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repository
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

# Pull the latest RISC-V Docs container image
# Pull the latest RISC-V Docs container image
- name: Pull Container
run: docker pull riscvintl/riscv-docs-base-container-image:latest

# Build PDF and HTML.
# Override VERSION and REVMARK for manual workflow dispatch
- name: Update environment variables
run: |
echo "VERSION=v${{ github.event.inputs.version }}" >> "$GITHUB_ENV"
echo "REVMARK=${{ github.event.inputs.revision_mark }}" >> "$GITHUB_ENV"
if: github.event_name == 'workflow_dispatch'

# Build PDF and HTML.
- name: Build Files
run: make all
env:
VERSION: v${{ github.event.inputs.version }}
REVMARK: ${{ github.event.inputs.revision_mark }}

# Upload the built PDF and HTML files as a single artifact
# Upload the built PDF and HTML files as a single artifact
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -66,7 +74,7 @@ jobs:
build/*.html
retention-days: 30

# Upload gitlab pages artefact.
# Upload GitHub pages artefacts.
- name: Make gitlab pages directory
run: mkdir dist && cp build/*.html dist/index.html
if: github.event_name == 'workflow_dispatch'
Expand All @@ -77,7 +85,7 @@ jobs:
path: dist
if: github.event_name == 'workflow_dispatch'

# Create Release
# Create Release
- name: Create Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -91,7 +99,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
if: github.event_name == 'workflow_dispatch'
# This condition ensures this step only runs for workflow_dispatch events.
# This condition ensures this step only runs for workflow_dispatch events.

# Deploy HTML to Github pages.
deploy:
Expand Down
Loading