forked from riscv/riscv-profiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New workflow for building releases (with PDF)
Based on docs-spec-template Signed-off-by: Jeff Scheel <jeff@riscv.org>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This work flow includes source and PDF in Release. It relies on the build-pdf workflow to create the PDF. | ||
# | ||
# NOTE: At this time it only runs manually. | ||
|
||
name: Create Document Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version, e.g. X.Y.Z:' | ||
required: true | ||
type: string | ||
prerelease: | ||
description: 'Tag as a pre-release?' | ||
required: false | ||
type: boolean | ||
default: true | ||
draft: | ||
description: 'Create release as a draft?' | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build-pdf.yml | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.version }} | ||
release_name: Release ${{ github.event.inputs.version }} | ||
draft: ${{ github.event.inputs.draft }} | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ needs.build.outputs.pdf-name }} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ needs.build.outputs.pdf-name }} | ||
asset_name: ${{ needs.build.outputs.name }}_${{ github.event.inputs.version }}.pdf | ||
asset_content_type: application/pdf |