summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml33
-rw-r--r--.github/release.md102
-rw-r--r--.github/workflows/pr-management.yml11
-rw-r--r--.github/workflows/release.yml5
4 files changed, 131 insertions, 20 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 9695146..9394d8b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -3,26 +3,33 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+# Basic set up for three package managers
+
version: 2
updates:
- - package-ecosystem: "github-actions"
+ # Maintain dependencies for Python
+ # Dependabot supports updates to pyproject.toml files
+ # if they follow the PEP 621 standard.
+ - package-ecosystem: "pip"
directory: "/"
- labels:
- - dependabot
schedule:
- interval: "weekly"
+ interval: "daily"
+ reviewers:
+ - "titom73"
+ labels:
+ - 'dependencies'
+ pull-request-branch-name:
+ separator: "/"
commit-message:
- prefix: "bump"
- include: "ci"
- open-pull-requests-limit: 10
- - package-ecosystem: "pip"
+ prefix: "bump: "
+ # Maintain dependencies for GitHub Actions
+ - package-ecosystem: "github-actions"
directory: "/"
- labels:
schedule:
interval: "weekly"
+ reviewers:
+ - "titom73"
labels:
- - dependabot
+ - 'CI'
commit-message:
- prefix: "bump"
- include: "requirements"
- open-pull-requests-limit: 10
+ prefix: "ci: "
diff --git a/.github/release.md b/.github/release.md
new file mode 100644
index 0000000..d95694d
--- /dev/null
+++ b/.github/release.md
@@ -0,0 +1,102 @@
+# Notes
+
+Notes regarding how to release eos-downloader package
+
+## Package requirements
+
+- `bumpver`
+- `build`
+- `twine`
+
+Also, [Github CLI](https://cli.github.com/) can be helpful and is recommended
+
+## Bumping version
+
+In a branch specific for this, use the `bumpver` tool.
+It is configured to update:
+* pyproject.toml
+
+For instance to bump a patch version:
+```
+bumpver update --patch
+```
+
+and for a minor version
+
+```
+bumpver update --minor
+```
+
+Tip: It is possible to check what the changes would be using `--dry`
+
+```
+bumpver update --minor --dry
+```
+
+## Creating release on Github
+
+Create the release on Github with the appropriate tag `vx.x.x`
+
+## Release version `x.x.x`
+
+> [!IMPORTANT]
+> TODO - make this a github workflow
+
+`x.x.x` is the version to be released
+
+This is to be executed at the top of the repo
+
+1. Checkout the latest version of `main` with the correct tag for the release
+2. Create a new branch for release
+
+ ```bash
+ git switch -c rel/vx.x.x
+ ```
+3. [Optional] Clean dist if required
+
+4. Build the package locally
+
+ ```bash
+ python -m build
+ ```
+5. Check the package with `twine` (replace with your vesion)
+
+ ```bash
+ twine check dist/*
+ ```
+6. Upload the package to test.pypi
+
+ ```bash
+ twine upload -r testpypi dist/eos-downloader-x.x.x.*
+ ```
+7. Verify the package by installing it in a local venv and checking it installs
+ and run correctly (run the tests)
+
+ ```bash
+ # In a brand new venv
+ pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --no-cache eos-downloader
+ ```
+8. Push to eos-downloader repository and create a Pull Request
+
+ ```bash
+ git push origin HEAD
+ gh pr create --title 'bump: eos-downloader vx.x.x'
+ ```
+9. Merge PR after review and wait for [workflow](https://github.com/titom73/eos-downloader/blob/main/.github/workflows/release.yml) to be executed.
+
+ ```bash
+ gh pr merge --squash
+ ```
+
+10. Like 7 but for normal pypi
+
+ ```bash
+ # In a brand new venv
+ pip install eos-downloader
+ ```
+
+11. Test installed version
+
+ ```bash
+ eos-downloader --version
+ ``` \ No newline at end of file
diff --git a/.github/workflows/pr-management.yml b/.github/workflows/pr-management.yml
index 508a870..233166e 100644
--- a/.github/workflows/pr-management.yml
+++ b/.github/workflows/pr-management.yml
@@ -4,7 +4,7 @@ on:
push:
branches:
- main
- pull_request_target:
+ pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
@@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Python
- uses: actions/setup-python@v3
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
@@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Python
- uses: actions/setup-python@v3
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
@@ -93,7 +93,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Python
- uses: actions/setup-python@v3
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
@@ -101,4 +101,5 @@ jobs:
run: pip install tox tox-gh-actions
- name: "Run tox for ${{ matrix.python }}"
- run: tox -e testenv
+ # run: tox -e testenv
+ run: tox
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 70cce9c..622a85d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -65,7 +65,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
- images:
+ images: |
${{ secrets.DOCKER_IMAGE }}
ghcr.io/${{ secrets.DOCKER_IMAGE }}
tags: |
@@ -106,7 +106,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
- images:
+ images: |
${{ secrets.DOCKER_IMAGE }}
ghcr.io/${{ secrets.DOCKER_IMAGE }}
tags: |
@@ -134,3 +134,4 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+