Skip to content

Upload Release Asset #35

Upload Release Asset

Upload Release Asset #35

Workflow file for this run

# Basic action for making a release and adding build artifacts.
on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
name: Upload Release Asset
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Poetry
run: |
python -m pip install --upgrade pip poetry
- name: Build project
id: poetry
run: |
poetry version ${GITHUB_REF##*/}
poetry build
echo "::set-output name=whl_loc::$(find dist -type f -name *.whl)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag_name="${GITHUB_REF_NAME}"
gh release upload $tag_name $(find ./dist/ -type f -printf "-a %p ")
- name: Build Docs # Need to update install directions to use new release
run: |
poetry install
poetry run make -C docs html
- name: Deploy Docs to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html