Updated artifact building
This commit is contained in:
parent
188dfb848a
commit
b207b94150
|
|
@ -16,6 +16,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Show version
|
||||||
|
run: |
|
||||||
|
echo $RELEASE_VERSION
|
||||||
|
echo ${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
- name: Upgrade pip
|
- name: Upgrade pip
|
||||||
run: |
|
run: |
|
||||||
# install pip=>20.1 to use "pip cache dir"
|
# install pip=>20.1 to use "pip cache dir"
|
||||||
|
|
@ -25,22 +33,6 @@ jobs:
|
||||||
id: pip-cache
|
id: pip-cache
|
||||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Cache install dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python3 -m pip install -r ./requirements.txt
|
run: python3 -m pip install -r ./requirements.txt
|
||||||
|
|
||||||
|
|
@ -50,13 +42,7 @@ jobs:
|
||||||
- name: Compress docs
|
- name: Compress docs
|
||||||
uses: montudor/action-zip@v0.1.0
|
uses: montudor/action-zip@v0.1.0
|
||||||
with:
|
with:
|
||||||
args: zip -qq -r docs.zip ./doc_src/_build/html
|
args: zip -qq -r pyforhandbook_html_docs_${{ env.RELEASE_VERSION }}.zip ./doc_src/_build/html
|
||||||
|
|
||||||
- name: Upload docs
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ github.ref }}
|
|
||||||
path: docs.zip
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
|
@ -68,3 +54,11 @@ jobs:
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload docs to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
name: ${{ github.ref }}
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: pyforhandbook_html_docs_${{ env.RELEASE_VERSION }}.zip
|
||||||
|
asset_name: pyforhandbook_html_docs_${{ env.RELEASE_VERSION }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue