Skip to content

Commit

Permalink
ruff workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Apr 4, 2024
1 parent af3989d commit 6a29758
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
jobs:
ruff:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "chartboost/ruff-action@v1"
with:
args: "format --check"
build:
needs:
- "ruff"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
Expand All @@ -23,31 +14,13 @@ jobs:
with:
name: "python-package-distributions"
path: "dist/"
test-pypi:
environment:
name: "test.pypi.org"
url: "https://test.pypi.org/project/beignet"
needs:
- "build"
permissions:
id-token: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/download-artifact@v3"
with:
name: "python-package-distributions"
path: "dist/"
- uses: "pypa/gh-action-pypi-publish@release/v1"
with:
repository-url: "https://test.pypi.org/legacy/"
skip-existing: true
pypi:
environment:
name: "pypi.org"
url: "https://pypi.org/project/beignet"
if: "startsWith(github.ref, 'refs/tags/')"
needs:
- "test-pypi"
- "build"
permissions:
id-token: "write"
runs-on: "ubuntu-latest"
Expand Down Expand Up @@ -78,4 +51,29 @@ jobs:
- env:
GITHUB_TOKEN: "${{ github.token }}"
run: "gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'"
ruff:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "chartboost/ruff-action@v1"
with:
args: "format --check"
test-pypi:
environment:
name: "test.pypi.org"
url: "https://test.pypi.org/project/beignet"
needs:
- "build"
permissions:
id-token: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/download-artifact@v3"
with:
name: "python-package-distributions"
path: "dist/"
- uses: "pypa/gh-action-pypi-publish@release/v1"
with:
repository-url: "https://test.pypi.org/legacy/"
skip-existing: true
on: "push"

0 comments on commit 6a29758

Please sign in to comment.