-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
4 changed files
with
79 additions
and
25 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 |
---|---|---|
|
@@ -10,49 +10,87 @@ on: | |
- master | ||
|
||
env: | ||
PROJECT_FOLDER: "qgis_plugin_repo" | ||
# PROJECT_FOLDER: "qgis_plugin_repo" | ||
PYTHON_VERSION: 3.8 | ||
|
||
jobs: | ||
# tests: | ||
# name: "Tests" | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - name: Get source code | ||
# uses: actions/checkout@v2 | ||
# | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v1 | ||
# with: | ||
# python-version: ${{ env.PYTHON_VERSION }} | ||
# | ||
# - name: Install Python requirements | ||
# run: python -m pip install -U pip setuptools wheel | ||
# | ||
tests: | ||
name: "Tests" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install Python requirements | ||
run: python -m pip install -U pip setuptools wheel | ||
|
||
- name: Debug | ||
run: ls -la | ||
|
||
# - name: Run tests | ||
# working-directory: tests | ||
# run: python -m unittest | ||
|
||
release: | ||
name: "Release on tag 🚀" | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
needs: [tests] | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- name: Get source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Setup | ||
run: | | ||
VERSION=${GITHUB_REF:-0.0.0} | ||
VERSION=${VERSION##*/} | ||
sed "s/__VERSION__/${VERSION}/" setup.py > setup.py | ||
sed -i "s/__VERSION__/${VERSION}/g" setup.py | ||
- name: Build package | ||
run: | | ||
python setup.py sdist | ||
- name: Deploy to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
- name: Debug | ||
run: | | ||
ls -al dist | ||
- name: Create release on GitHub | ||
id: create_release | ||
uses: ncipollo/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
allowUpdates: true | ||
artifacts: "dist/*.tar.gz" | ||
# tag_name: ${{ github.ref }} | ||
# release_name: ${{ github.ref }} | ||
# body_path: release.md | ||
|
||
# - name: Deploy to PyPI | ||
# uses: pypa/gh-action-pypi-publish@master | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
# | ||
# - name: Upload Release Asset | ||
# id: upload-release-asset | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
# asset_path: ./my-artifact.zip | ||
# asset_name: my-artifact.zip | ||
# asset_content_type: application/zip |
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
.idea/ | ||
|
||
# Python | ||
build/ | ||
dist/ | ||
__pycache__/ | ||
*.egg-info | ||
.venv | ||
|
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,14 @@ | ||
version: 2 | ||
updates: | ||
|
||
# - package-ecosystem: pip | ||
# directory: "/requirements" | ||
# schedule: | ||
# interval: monthly | ||
# time: "04:00" | ||
# timezone: Europe/Paris | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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