Tweak llm.md docs #621
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 | |
# Workflow Triggers | |
on: | |
# On a PullRequest against main | |
pull_request: | |
branches: [ "main" ] | |
types: ["closed", "labeled", "synchronize"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
COUNCIL_DRAFT: ${{ github.event.pull_request.merged == false }} | |
COUNCIL_LATEST: ${{ github.event.pull_request.merged == true }} | |
jobs: | |
release: | |
# Pull Request object schema: https://docs.github.com/en/graphql/reference/objects#pullrequest | |
if: | | |
contains(github.event.pull_request.labels.*.name, 'release') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: 'pip' | |
- name: Installing dev requirements | |
run: pip3 install -r dev-requirements.txt | |
- name: Packaging | |
run: hatch build | |
- name: Version | |
id: hatch-version | |
run: | | |
echo version=$(hatch version) >> $GITHUB_OUTPUT | |
- name: Git Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "dist/*" | |
draft: ${{ env.COUNCIL_DRAFT }} | |
generateReleaseNotes: ${{ env.COUNCIL_DRAFT }} | |
makeLatest: ${{ env.COUNCIL_LATEST }} | |
tag: v${{ steps.hatch-version.outputs.version }} | |
updateOnlyUnreleased: true | |
- name: Publish to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ env.COUNCIL_DRAFT == 'true' }} | |
with: | |
password: ${{ secrets.TEST_PYPI_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish to PyPI | |
if: ${{ env.COUNCIL_DRAFT == 'false' && env.COUNCIL_LATEST == 'true' }} | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: env var | |
run: export | |
if: always() |