condensed all actions into a single workflow file
This commit is contained in:
parent
c6b35a5248
commit
a6f80a49d5
4 changed files with 47 additions and 71 deletions
47
.forgejo/workflows/actions.yaml
Normal file
47
.forgejo/workflows/actions.yaml
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Actions
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt
|
||||
|
||||
- name: Build the package
|
||||
run: ./.venv/bin/python -m build
|
||||
|
||||
- name: Upload the package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: stellarismodparser
|
||||
path: ./dist/*
|
||||
|
||||
- name: Publish to PyPi
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/pypi-publish@v1.8.14
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
Lint Code (Ruff & Pylint):
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt
|
||||
|
||||
- name: Analysing code with Ruff
|
||||
run: ./.venv/bin/ruff check $(git ls-files '*.py')
|
||||
continue-on-error: true
|
||||
|
||||
- name: Analysing code with Pylint
|
||||
run: ./.venv/bin/pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|
|
@ -1,23 +0,0 @@
|
|||
name: Build
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
Build and Push:
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt
|
||||
|
||||
- name: Build the package
|
||||
run: ./.venv/bin/python -m build
|
||||
|
||||
- name: Upload the package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package
|
||||
path: ./dist/*
|
|
@ -1,24 +0,0 @@
|
|||
name: Lint
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Lint Code (Ruff & Pylint):
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt
|
||||
|
||||
- name: Analysing code with Ruff
|
||||
run: ./.venv/bin/ruff check $(git ls-files '*.py')
|
||||
continue-on-error: true
|
||||
|
||||
- name: Analysing code with Pylint
|
||||
run: ./.venv/bin/pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|
|
@ -1,24 +0,0 @@
|
|||
name: Publish
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
Build and Publish:
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt
|
||||
|
||||
- name: Build the package
|
||||
run: ./.venv/bin/python -m build
|
||||
|
||||
- name: Publish the package
|
||||
uses: actions/pypi-publish@v1.8.14
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
Loading…
Reference in a new issue