Skip to content

feat(ci): add build workflow #5

feat(ci): add build workflow

feat(ci): add build workflow #5

Workflow file for this run

name: Python Release Build
on:
workflow_dispatch:
push:
branches: [ main ]
tags:
- 'v*'
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- run: poetry install
- name: set version
shell: bash
run: |
pyproject="$(cat pyproject.toml)"
version="${{ github.ref }}"
if [[ "$version" = "refs/heads/main" ]]; then
version="0.0.0-dev"
else
version="${version/refs\/tags\/v/}"
fi
<<<"$pyproject" >pyproject.toml sed -e 's/^version = "0.0.0.replaced-by-ci"/version = "'"$version"'"/g'
- name: Run Python docs
run: |
just docs
- name: Upload docs artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: docs
build:

Check failure on line 44 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 44
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- name: Install poetry
run: pipx install poetry
- name: set version
shell: bash
run: |
pyproject="$(cat pyproject.toml)"
version="${{ github.ref }}"
if [[ "$version" = "refs/heads/main" ]]; then
version="0.0.0-dev"
else
version="${version/refs\/tags\/v/}"
fi
<<<"$pyproject" >pyproject.toml sed -e 's/^version = "0.0.0.replaced-by-ci"/version = "'"$version"'"/g'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- run: poetry install
- name: build releases
run: |
just build
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*
release:
needs: [docs, build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: dist
- uses: actions/download-artifact@v3
with:
name: docs
- name: Upload Artifact to Draft Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
docs
dist/*
if: startsWith(github.ref, 'refs/tags/')
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
docs/
dist/*
if: github.ref == 'refs/heads/main'