diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..f69b15c --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,39 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +template: | + # What's Changed + $CHANGES + + # Who Contributes + $CONTRIBUTORS +categories: + - title: '🏆 Milestone' + label: 'type: milestone' + - title: '🚀 New' + label: 'type: enhancement' + - title: '🐛 Bug Fixes' + label: 'type: bug' + - title: '🧰 Maintenance' + label: 'type: maintenance' + - title: '🗂 Documentation' + label: 'type: documentation' + - title: '🔗 Dependency Updates' + label: 'type: dependencies' + +version-resolver: + major: + labels: + - 'type: milestone' + minor: + labels: + - 'type: enhancement' + patch: + labels: + - 'type: bug' + - 'type: maintenance' + - 'type: documentation' + - 'type: dependencies' + - 'type: security' + +exclude-labels: + - 'skip-changelog' \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..3ea31bf --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,60 @@ +name: PyPi Publishing +on: + push: + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + branches: + - main +jobs: + # Release new version on github releases + Github-release: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: true + + Matrix-build: + name: Python ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + strategy: + matrix: + python-version: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + run: | + python setup.py sdist bdist_wheel + twine upload dist/* + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02374c9..61b2813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,24 +7,9 @@ on: branches: [main] jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r dev-requirements.txt - - uses: pre-commit/action@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} build: name: Python ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} - needs: pre-commit strategy: fail-fast: false matrix: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..d2cd318 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 7cb1ba6..e293cc0 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/AI2Business/mkdocstrings-sourcelink/main.svg)](https://results.pre-commit.ci/latest/github/AI2Business/mkdocstrings-sourcelink/main) [![codecov](https://codecov.io/gh/AI2Business/mkdocstrings-sourcelink/branch/main/graph/badge.svg?token=DKE0SHCRF7)](https://codecov.io/gh/AI2Business/mkdocstrings-sourcelink) [![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/AI2Business/mkdocstrings-sourcelink.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/AI2Business/mkdocstrings-sourcelink/context:python) # mkdocstrings-sourcelink diff --git a/docs/assets/img/export.png b/docs/assets/img/export.png index 0cb7634..ed2fef0 100644 Binary files a/docs/assets/img/export.png and b/docs/assets/img/export.png differ