Skip to content

Commit

Permalink
🌅 Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithEmad committed Jul 26, 2024
0 parents commit 9252dbf
Show file tree
Hide file tree
Showing 22 changed files with 1,206 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Report a bug in tutor-contrib-wordpress
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. Linux]
- Version [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest or encourage the addition of a new feature to tutor-contrib-wordpress
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
30 changes: 30 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish package to PyPI

on:
release:
types: [published]

jobs:

push:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install pip
run: pip install wheel setuptools

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This script can be tested locally with act:
#
# act --secret GITHUB_TOKEN=... --job release
#
# https://github.com/nektos/act/
# To generate a token: https://github.com/settings/tokens (add r/w permissions for "Contents")
name: Release

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# https://github.com/actions/runner-images#available-images
- os: ubuntu-20.04
locale: C.UTF-8
env:
LC_ALL: ${{ matrix.locale }}
LANG: ${{ matrix.locale }}
steps:
##### Setup environment
# https://github.com/actions/checkout
- uses: actions/checkout@v3
- name: Set up Python
# https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: 'pip'
- name: Upgrade pip and setuptools
# https://pypi.org/project/pip/
# https://pypi.org/project/setuptools/
# https://pypi.org/project/wheel/
run: python -m pip install --upgrade pip setuptools==65.6.3 wheel
- name: Print info about the current python installation
run: make ci-info
- name: Install requirements
run: make bootstrap-dev
- name: Check or download gh utility
run: |
if ! which gh; then
echo "Downloading 'gh' utility"
if [ "$(uname -s)" = "Linux" ]; then
curl -L -o gh.tar.gz https://github.com/cli/cli/releases/download/v2.28.0/gh_2.28.0_linux_amd64.tar.gz
tar xzf gh.tar.gz
mv ./gh_2.28.0_linux_amd64/bin/gh /usr/local/bin/gh
else
curl -L -o gh.zip https://github.com/cli/cli/releases/download/v2.28.0/gh_2.28.0_macOS_amd64.zip
unzip xzf gh.zip
mv ./gh_2.28.0_macOS_amd64/bin/gh /usr/local/bin/gh
fi
which gh
fi
##### Create release on GitHub
- name: Create or update GitHub release
run: scriv github-release --repo=codewithemad/tutor-contrib-wordpress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run tests

on:
pull_request:
branches: [master]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: |
pip install .[dev]
- name: Test lint, types, and format
run: make test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.*.swp
!.gitignore
TODO
__pycache__
*.egg-info/
/build/
/dist/
.venv/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

<a id='changelog-1.0.0'></a>
## v1.0.0 (2024-07-25)

- [Improvement] Plugin Burn - First Release! 🔥(by @CodeWithEmad)
Loading

0 comments on commit 9252dbf

Please sign in to comment.