-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2d35631
Showing
12 changed files
with
1,599 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Cache build dependencies | ||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
actions: write # require to delete cache | ||
|
||
jobs: | ||
|
||
conv-cache: | ||
name: Cache build dependencies | ||
runs-on: ubuntu-latest | ||
env: | ||
cache-key: build_cache | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip | ||
- name: Delete Previous Cache | ||
continue-on-error: true | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete "${{ env.cache-key }}" --confirm | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Save Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: /opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages | ||
key: ${{ env.cache-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Publish on Github and PyPi | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build-package: | ||
name: Build Python package | ||
runs-on: ubuntu-latest | ||
env: | ||
cache-key: build_cache | ||
steps: | ||
- name: Checkout current code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Restore Cache | ||
id: python-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: /opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages | ||
key: ${{ env.cache-key }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: python-files | ||
path: dist/ | ||
retention-days: 1 | ||
|
||
publish-github: | ||
name: Create a release on Github | ||
runs-on: ubuntu-latest | ||
needs: build-package | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: python-files | ||
path: dist/ | ||
- name: Publish on Github | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
makeLatest: true | ||
artifacts: dist/* | ||
artifactErrorsFailBuild: true | ||
|
||
publish-pypi: | ||
name: Publish on PyPi | ||
runs-on: ubuntu-latest | ||
needs: publish-github | ||
permissions: | ||
id-token: write | ||
actions: write | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: python-files | ||
path: dist/ | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
repository: prochy-exe/subsplease-scraper | ||
event-type: new_release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mal_helper.egg-info | ||
__pycache__ | ||
config | ||
cache | ||
/.vscode | ||
/build |
Oops, something went wrong.