forked from bogdanb/hpmor
-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
82 additions
and
12 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
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,69 @@ | ||
# This manually started workflow builds PDFs and eBooks and creates a new release with these assets. | ||
# Build part is copied from make.yml . | ||
|
||
name: "Create Release" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version_number: | ||
description: 'Version number' | ||
required: true | ||
default: 'v1.2.1' | ||
version_text: | ||
description: 'Description' | ||
required: false | ||
default: '' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
# - name: test print | ||
# run: | | ||
# echo "version_number: ${{ github.event.inputs.version_number }}" | ||
# echo "version_number: ${{ github.event.inputs.version_text }}" | ||
|
||
# steps are copied from make.yml | ||
|
||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Python setup | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: set up Python cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-py-cache | ||
|
||
- name: quality check of chapters for known issues | ||
run: python3 scripts/check-chapters.py | ||
|
||
- name: run pre-commit tests | ||
# configured in .pre-commit-config.yaml and setup.cfg | ||
uses: pre-commit/action@v3.0.0 | ||
|
||
- name: install requirements | ||
run: sh scripts/install_requirements.sh > /dev/null | ||
|
||
- name: make PDFs | ||
run: sh scripts/make_pdfs.sh > /dev/null | ||
|
||
- name: make eBooks | ||
run: sh scripts/make_ebooks.sh | ||
|
||
- name: "create release" | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: "${{ inputs.version_number }}" | ||
prerelease: false | ||
files: | | ||
./hpmor*.pdf | ||
./hpmor.epub | ||
./hpmor.mobi | ||
./hpmor.fb2 |
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