Update time simulation parameters z #72
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
create_release: | |
name: Create release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
release_manual: | |
name: Release manual to GitHub | |
needs: create_release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
texlive_version: 2023 | |
root_file: main.tex | |
working_directory: manual/ | |
- name: Upload Release Asset (pdf) to GitHub | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: manual/main.pdf | |
asset_name: ${{ github.event.repository.name }}-manual-${{ github.ref_name }}.pdf | |
asset_content_type: pdf | |
release_library: | |
name: Release library to PyPI and GitHub | |
needs: create_release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Build source and wheel distributions | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools wheel twine | |
python -m pip install -r requirements.txt | |
python -m setup sdist bdist_wheel | |
twine check --strict dist/* | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Get Asset name | |
run: | | |
export PKG=$(ls dist/ | grep tar) | |
set -- $PKG | |
echo "name=$1" >> $GITHUB_ENV | |
- name: Upload Release Asset (sdist) to GitHub | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: dist/${{ env.name }} | |
asset_name: ${{ env.name }} | |
asset_content_type: application/zip | |
release_docs: | |
name: Release docs to GitHub pages | |
needs: release_library | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Build docs | |
uses: fuodorov/sphinx-action@master | |
with: | |
docs-folder: "docs/" | |
- name: Create an artifact of the html output. | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Documentation HTML | |
path: docs/_build/html/ | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/fuodorov/redpic.git --branch gh-pages --single-branch gh-pages | |
cp -r docs/_build/html/* gh-pages/ | |
cd gh-pages | |
touch .nojekyll | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
- name: Push documentation changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: gh-pages | |
directory: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} |