StellarisModParser/.forgejo/workflows/actions.yaml
cswimr f075c6dbda
All checks were successful
Actions / Lint Code (Ruff & Pylint) (push) Successful in 13s
Actions / Build Package (push) Successful in 1m5s
transition to uv
2024-11-14 12:26:33 -05:00

56 lines
1.6 KiB
YAML

name: Actions
on:
push:
jobs:
build:
name: Build Package
runs-on: docker
container: www.coastalcommits.com/cswimr/actions:uv
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: uv sync --color=always
- name: Build the package
run: uv build --color=always
- name: Upload the package
uses: actions/upload-artifact@v3
with:
name: stellarismodparser
path: ./dist/*
- name: Publish to CoastalCommits
if: startsWith(github.ref, 'refs/tags/')
uses: actions/pypi-publish@v1.8.14
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.COASTALCOMMITSTOKEN }}
repository_url: https://www.coastalcommits.com/api/packages/${{ github.repository_owner }}/pypi
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/tags/')
uses: actions/pypi-publish@v1.8.14
with:
password: ${{ secrets.PYPI_API_TOKEN }}
lint:
name: Lint Code (Ruff & Pylint)
runs-on: docker
container: www.coastalcommits.com/cswimr/actions:uv
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: uv build --color=always
- name: Analysing code with Ruff
run: uv run --color=always ruff check $(git ls-files '*.py')
continue-on-error: true
- name: Analysing code with Pylint
run: uv run --color=always pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')