-
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
26 changed files
with
1,954 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,14 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
* text eol=lf |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,82 @@ | ||
name: Publish | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [closed] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install hatch | ||
run: | | ||
pip install --upgrade pip | ||
pip install hatch | ||
- name: Get version info | ||
id: version | ||
run: echo "version=$(hatch version)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build distribution | ||
run: hatch build | ||
|
||
- name: upload distribution | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: | | ||
dist/* | ||
src/qgis_venv_creator/create_qgis_venv.py | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
|
||
release: | ||
name: Create a Github release | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Download distribution | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: "Release ${{ needs.build.outputs.version }}" | ||
tag_name: "v${{ needs.build.outputs.version }}" | ||
files: | | ||
dist/* | ||
src/qgis_venv_creator/create_qgis_venv.py | ||
publish: | ||
name: Publish to PyPI | ||
needs: [build] | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download distribution | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
|
||
- name: publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,54 @@ | ||
name: Prepare a Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version bump" | ||
required: true | ||
default: "minor" | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
jobs: | ||
update-version: | ||
name: Update version and changelog | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Update the version | ||
id: version | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install hatch | ||
hatch version ${{ github.event.inputs.version }} | ||
echo "version=$(hatch version)" >> "$GITHUB_OUTPUT" | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: "Bump version to ${{ steps.version.outputs.version }}" | ||
push: false | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: release/${{ steps.version.outputs.version }} | ||
title: "Prepare release ${{ steps.version.outputs.version }}" | ||
body: "Bump the version to ${{ steps.version.outputs.version }}." | ||
base: main | ||
labels: release | ||
assignees: ${{ github.actor }} |
Oops, something went wrong.