Skip to content

Commit

Permalink
Update build-pdf.yml
Browse files Browse the repository at this point in the history
Add the capability to auto increment the release versions and adjust the specification state options according what is currently used.

Signed-off-by: Rafael Sene <[email protected]>
  • Loading branch information
rpsene authored May 23, 2024
1 parent ba5068f commit eb7509c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ name: Create Specification Document
on:
workflow_dispatch:
inputs:
version:
description: 'Release version, e.g. X.Y.Z:'
required: true
type: string
revision_mark:
description: 'Set revision mark as Draft, Release or Stable:'
required: true
type: choice
options:
- Draft
- Release
- Development
- Stable
- Frozen
- Ratified
default: Draft
prerelease:
description: Tag as a pre-release?
Expand Down Expand Up @@ -44,14 +41,21 @@ jobs:
with:
submodules: recursive

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch

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

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

Expand All @@ -71,9 +75,9 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/build/*.pdf
tag_name: v${{ github.event.inputs.version }}
name: Release ${{ github.event.inputs.version }}
files: ${{ github.workspace }}/specification/*.pdf
tag_name: v${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}
env:
Expand Down

0 comments on commit eb7509c

Please sign in to comment.