Skip to content

Commit 94d8b5e

Browse files
committed
update workflows
1 parent 8748e20 commit 94d8b5e

File tree

5 files changed

+49
-25
lines changed

5 files changed

+49
-25
lines changed

.github/workflows/dependencies.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ jobs:
2121
os: ['ubuntu-latest']
2222
python-version: ['3.10']
2323

24+
permissions:
25+
contents: write
26+
actions: write
27+
2428
steps:
2529
- uses: actions/checkout@v5
30+
with:
31+
token: ${{ secrets.PAT }}
2632

2733
- uses: astral-sh/setup-uv@v6
2834
with:
@@ -49,4 +55,12 @@ jobs:
4955
run: |
5056
echo "Dependency file(s) changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
5157
git diff
52-
core.setFailed('Please add your new dependencies in setup.py and/or requirements-dev.in then run pip-compile to add them in requirements. (see docs/contribute/development)')
58+
# core.setFailed('Please add your new dependencies in setup.py and/or requirements-dev.in then run pip-compile to add them in requirements. (see docs/contribute/development)')
59+
60+
- name: Commit files changed
61+
uses: stefanzweifel/git-auto-commit-action@v4
62+
if: steps.verify-changed-files.outputs.files_changed == 'true'
63+
with:
64+
# Optional. Commit message for the created commit.
65+
# Defaults to "Apply automatic changes"
66+
commit_message: "Fix deps"

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: |
3737
cd docs/
3838
uv pip install -r requirements.txt
39-
make html SPHINXOPTS="-W"
39+
make html SPHINXOPTS="-W"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
4545
- name: Check format
4646
run: |
47-
ruff format --check geotrek
47+
ruff format --check geotrek

.github/workflows/release.yml

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Release process
22

33
on:
4-
workflow_run:
5-
workflows: ["Test CI"]
6-
types:
7-
- completed
8-
94
workflow_dispatch:
105
inputs:
116
version:
@@ -22,22 +17,31 @@ jobs:
2217
name: Run other workflows
2318
runs-on: ubuntu-latest
2419
steps:
25-
- name: Trigger Test CI workflow
20+
- name: Trigger Linting workflow
2621
uses: benc-uk/workflow-dispatch@v1
2722
with:
2823
workflow: 'Linting'
2924
repo: ${{ github.repository }}
3025
ref: 'master'
3126
token: ${{ secrets.GITHUB_TOKEN }}
3227

28+
- name: Trigger Docs workflow
29+
uses: benc-uk/workflow-dispatch@v1
30+
with:
31+
workflow: 'Documentation'
32+
repo: ${{ github.repository }}
33+
ref: 'master'
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
3336
deploy:
3437
name: Publish
3538
needs: [run_other_workflows]
3639
runs-on: ubuntu-latest
3740
permissions:
38-
# Give the default GITHUB_TOKEN write permission to commit and push the
39-
# added or changed files to the repository.
4041
contents: write
42+
packages: write
43+
actions: write
44+
4145
steps:
4246
- uses: actions/checkout@v5
4347
- name: Prepare release
@@ -52,16 +56,21 @@ jobs:
5256
# Defaults to "Apply automatic changes"
5357
commit_message: "Prepare release ${{ github.event.inputs.version }}"
5458
tagging_message: ${{ github.event.inputs.version }}
55-
# - name: Tag, push and create associated new release with auto generated notes
56-
# run: |
57-
# git tag ${{ github.event.inputs.version }}
58-
# git push origin HEAD --tags
59-
# gh release create ${{ github.event.inputs.version }} --title "Release ${{ github.event.inputs.version }}"
60-
# # env:
61-
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
#
63-
# #- name: Make release
64-
# uses: ncipollo/release-action@v1
65-
# with:
66-
# tag: ${{ github.event.inputs.version }}
67-
# name: Release ${{ github.event.inputs.version }}
59+
60+
- name: Create GitHub Release
61+
run : |
62+
gh release create ${{ github.event.inputs.version }} --generate-notes
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.PAT }}
65+
66+
- name: Back to dev
67+
run: |
68+
echo "Back to development"
69+
make back_to_dev version=${{ github.event.inputs.version }}
70+
71+
- name: Commit back to development changes
72+
uses: stefanzweifel/git-auto-commit-action@v4
73+
with:
74+
# Optional. Commit message for the created commit.
75+
# Defaults to "Apply automatic changes"
76+
commit_message: "Back to development"

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
name: Test CI
55

66
on:
7+
workflow_dispatch:
78
pull_request:
89
paths-ignore:
910
- 'docs/**'
@@ -535,4 +536,4 @@ jobs:
535536
env:
536537
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
537538
with:
538-
args: 'install-docker.zip'
539+
args: 'install-docker.zip'

0 commit comments

Comments
 (0)