Skip to content

Commit

Permalink
🎉feat: 更新包的配置&完善Github Actions&删除已弃用文件等
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ue1nWh1te committed Oct 23, 2024
1 parent 5cb8adf commit b0efad0
Show file tree
Hide file tree
Showing 12 changed files with 2,537 additions and 4,163 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Gitleaks Scan

on:
push:
pull_request:
workflow_dispatch:

jobs:
gitleaks:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fail-on-error: true

- name: Exit If Gitleaks Check Failed
if: failure()
run: |
echo "Gitleaks Check Failed"
exit 1
35 changes: 35 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build And Publish

on:
push:
tags:
- "v*"

jobs:
pypi:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Tools
run: |
python -m pip install --upgrade poetry twine
poetry config virtualenvs.create false
- name: Build Package
run: |
poetry install
poetry build
twine check --strict dist/*
- name: Publish To PyPI
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Loading

0 comments on commit b0efad0

Please sign in to comment.