From b7b7463dae110dd5e9d6551c556926f58d79deee Mon Sep 17 00:00:00 2001 From: Zaid Date: Mon, 26 Aug 2024 19:15:00 +0300 Subject: [PATCH] add workflows --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/ruff.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3874d45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: ["*"] + +permissions: + contents: write + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - run: python -m pip install build + + - run: python -m build + + - uses: pypa/gh-action-pypi-publish@release/v1 + + - uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true \ No newline at end of file diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..2777b75 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,35 @@ +name: ruff + +on: + push: + branches: [main] + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install ruff + run: | + python -m pip install --upgrade pip + pip install ruff + - run: ruff format --check akinator + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install ruff + run: | + python -m pip install --upgrade pip + pip install ruff + - run: ruff check akinator \ No newline at end of file