-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
1 changed file
with
14 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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? | ||
|
@@ -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' | ||
|
||
|
@@ -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: | ||
|