Skip to content

Commit 7d86bc7

Browse files
committed
add worflows
1 parent 22f7407 commit 7d86bc7

File tree

7 files changed

+358
-0
lines changed

7 files changed

+358
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '42 19 * * 5'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners
29+
# Consider using larger runners for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# only required for workflows in private repositories
37+
actions: read
38+
contents: read
39+
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
language: [ 'python' ]
44+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
45+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
46+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
47+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
48+
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
53+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@v3
56+
with:
57+
languages: ${{ matrix.language }}
58+
# If you wish to specify custom queries, you can do so here or in a config file.
59+
# By default, queries listed here will override any specified in a config file.
60+
# Prefix the list here with "+" to use these queries and those in the config file.
61+
62+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63+
# queries: security-extended,security-and-quality
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: mvincig11
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
git fetch --all --tags
31+
python setup.py sdist bdist_wheel
32+
twine upload dist/*

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- pre/*
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install git
14+
run: |
15+
sudo apt update
16+
sudo apt install -y git
17+
- name: Install the latest version of rye
18+
uses: eifinger/setup-rye@v3
19+
- name: Install Node Env
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
- name: Checkout
24+
uses: actions/checkout@v4.1.1
25+
with:
26+
fetch-depth: 0
27+
persist-credentials: false
28+
- name: Build app
29+
run: |
30+
rye sync --no-lock
31+
rye build
32+
id: build_cache
33+
if: success()
34+
- name: Cache build
35+
uses: actions/cache@v2
36+
with:
37+
path: ./dist
38+
key: ${{ runner.os }}-build-${{ hashFiles('dist/**') }}
39+
if: steps.build_cache.outputs.id != ''
40+
41+
release:
42+
name: Release
43+
runs-on: ubuntu-latest
44+
needs: build
45+
environment: development
46+
if: |
47+
github.event_name == 'push' && github.ref == 'refs/heads/main' ||
48+
github.event_name == 'push' && github.ref == 'refs/heads/pre/beta' ||
49+
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'main' ||
50+
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'pre/beta'
51+
permissions:
52+
contents: write
53+
issues: write
54+
pull-requests: write
55+
id-token: write
56+
steps:
57+
- name: Checkout repo
58+
uses: actions/checkout@v4.1.1
59+
with:
60+
fetch-depth: 0
61+
persist-credentials: false
62+
- name: Semantic Release
63+
uses: cycjimmy/semantic-release-action@v4.1.0
64+
with:
65+
semantic_version: 23
66+
extra_plugins: |
67+
semantic-release-pypi@3
68+
@semantic-release/git
69+
@semantic-release/commit-analyzer@12
70+
@semantic-release/release-notes-generator@13
71+
@semantic-release/github@10
72+
@semantic-release/changelog@6
73+
conventional-changelog-conventionalcommits@7
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update requirements
2+
on:
3+
push:
4+
paths:
5+
- 'pyproject.toml'
6+
- '.github/workflows/update-requirements.yml'
7+
8+
jobs:
9+
update:
10+
name: Update requirements
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install the latest version of rye
14+
uses: eifinger/setup-rye@v3
15+
- name: Build app
16+
run: rye run update-requirements
17+
commit:
18+
name: Commit changes
19+
run: |
20+
git config --global user.name 'github-actions'
21+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
22+
git add .
23+
git commit -m "ci: update requirements.txt [skip ci]"
24+
git push
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,19 @@ print(entities)
210210
}
211211
}
212212
```
213+
214+
## 🤝 Contributing
215+
216+
Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!
217+
218+
Please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
219+
220+
[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/uJN7TYcpNa)
221+
[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)
222+
[![My Skills](https://skillicons.dev/icons?i=twitter)](https://twitter.com/scrapegraphai)
223+
224+
***
225+
## Created by Scrapegraphai
226+
227+
![](docs/assets/scrapegraphai_logo.svg)
228+
***

docs/assets/graph_pyecharts.png

-1019 Bytes
Loading

0 commit comments

Comments
 (0)