Skip to content

Commit 3001bf0

Browse files
committed
Merge branch 'next_steps_workflow' into release_0.6.1
2 parents e43a182 + 6ad1486 commit 3001bf0

7 files changed

+133
-162
lines changed

template/{% if AddCitation %}CITATION.cff{% endif %}.jinja

+2-11
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,14 @@
33
cff-version: "1.2.0"
44
title: "{{ package_name }}"
55
authors:
6-
-
7-
family-names: {{ full_name.replace('\"', '\\\"').split(' ')[-1] }}
6+
- family-names: {{ full_name.replace('\"', '\\\"').split(' ')[-1] }}
87
given-names: {{ full_name.replace('\"', '\\\"').split(' ')[0] }}
98
orcid: "https://orcid.org/0000-0000-0000-0000"
10-
date-released: 20??-MM-DD
11-
doi: <insert your DOI here>
9+
date-released: {{ '%Y-%m-%d' | strftime }}
1210
version: "{{ version }}"
1311
repository-code: "{{ repository_url }}"
1412
keywords:
1513
{%- for item in keywords.split(',') %}
1614
- "{{ item }}"
1715
{%- endfor %}
1816
message: "If you use this software, please cite it using these metadata."
19-
{{ { "Apache Software License 2.0": "license: Apache-2.0",
20-
"MIT license": "license: MIT",
21-
"BSD license": "license: BSD-3-Clause",
22-
"ISC license": "license: ISC",
23-
"GNU General Public License v3 or later": "license: GPL-3.0-or-later",
24-
"Not open source": ""
25-
}[license] }}

template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddCitation %}next_steps_citation.yml{% endif %}

-30
This file was deleted.

template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddLinting %}next_steps_linting.yml{% endif %}

-30
This file was deleted.

template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddOnlineDocumentation %}next_steps_online_documentation.yml{% endif %}

-30
This file was deleted.

template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}next_steps_sonarcloud.yml{% endif %}

-30
This file was deleted.

template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddZenodo %}next_steps_zenodo.yml{% endif %}

-31
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
on: [push]
2+
permissions:
3+
contents: write
4+
issues: write
5+
name: Create GitHub issues
6+
jobs:
7+
next_steps:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
{%- if AddCitation %}
13+
- name: Create citation data issue
14+
uses: JasonEtco/create-an-issue@v2
15+
env:
16+
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
17+
with:
18+
filename: .github/workflows/next_steps_citation_issue.md
19+
id: citation
20+
- name: List created issues
21+
run: |
22+
echo "Created issues that must be completed to have fully working Python package:
23+
* Citation data {{ '${{' }} steps.citation.outputs.url {{ '}}' }}"
24+
- name: Cleanup files needed to create next steps issues
25+
run: |
26+
git config --global user.name 'NLeSC Python template'
27+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
28+
git pull # other next step workflows may push changes before
29+
git rm .github/workflows/next_steps_citation_issue.md
30+
git commit -am "Cleanup automated next steps issue generator for citation"
31+
git push
32+
{%- endif %}
33+
34+
{%- if AddLinting %}
35+
- name: Create linting issue
36+
uses: JasonEtco/create-an-issue@v2
37+
env:
38+
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
39+
with:
40+
filename: .github/workflows/next_steps_linting_issue.md
41+
id: linting
42+
- name: List created issues
43+
run: |
44+
echo "Created issues that must be completed to have fully working Python package:
45+
* Linting fixes {{ '${{' }} steps.linting.outputs.url {{ '}}' }}"
46+
- name: Cleanup files needed to create next steps issues
47+
run: |
48+
git config --global user.name 'NLeSC Python template'
49+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
50+
git pull # other next step workflows may push changes before
51+
git rm .github/workflows/next_steps_linting_issue.md
52+
git commit -am "Cleanup automated next steps issue generator"
53+
git push
54+
{%- endif %}
55+
56+
{%- if AddOnlineDocumentation %}
57+
- name: Create online documentation issue
58+
uses: JasonEtco/create-an-issue@v2
59+
env:
60+
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
61+
with:
62+
filename: .github/workflows/next_steps_online_documentation_issue.md
63+
id: readthedocs
64+
- name: List created issues
65+
run: |
66+
echo "Created issues that must be completed to have fully working Python package:
67+
* Read the Docs instructions {{ '${{' }} steps.readthedocs.outputs.url {{ '}}' }}"
68+
- name: Cleanup files needed to create next steps issues
69+
run: |
70+
git config --global user.name 'NLeSC Python template'
71+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
72+
git pull # other next step workflows may push changes before
73+
git rm .github/workflows/next_steps_online_documentation_issue.md
74+
git commit -am "Cleanup automated next steps issue generator for online documentation"
75+
git push
76+
{%- endif %}
77+
78+
{%- if AddZenodo %}
79+
- name: Create Zenodo integration issue
80+
uses: JasonEtco/create-an-issue@v2
81+
env:
82+
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
83+
with:
84+
filename: .github/workflows/next_steps_zenodo_issue.md
85+
id: zenodo
86+
- name: List created issues
87+
run: |
88+
echo "Created issues that must be completed to have fully working Python package:
89+
* Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}"
90+
- name: Cleanup files needed to create next steps issues
91+
run: |
92+
git config --global user.name 'NLeSC Python template'
93+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
94+
git pull # other next step workflows may push changes before
95+
git rm .github/workflows/next_steps_zenodo_issue.md
96+
git commit -am "Cleanup automated next steps issue generator for zenodo"
97+
git push
98+
{%- endif %}
99+
100+
{%- if AddSonarCloud %}
101+
- name: Create Sonarcloud issue
102+
uses: JasonEtco/create-an-issue@v2
103+
env:
104+
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
105+
with:
106+
filename: .github/workflows/next_steps_sonarcloud_issue.md
107+
id: sonarcloud
108+
- name: List created issues
109+
run: |
110+
echo "Created issues that must be completed to have fully working Python package:
111+
* Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}"
112+
- name: Cleanup files needed to create next steps issues
113+
run: |
114+
git config --global user.name 'NLeSC Python template'
115+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
116+
git pull # other next step workflows may push changes before
117+
git rm .github/workflows/next_steps_sonarcloud_issue.md
118+
git commit -am "Cleanup automated next steps issue generator for sonarcloud"
119+
git push
120+
{%- endif %}
121+
122+
{%- if AddCitation or AddLinting or AddOnlineDocumentation or AddZenodo or AddSonarCloud %}
123+
- name: Cleanup files needed to create next steps issues
124+
run: |
125+
git config --global user.name 'NLeSC Python template'
126+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
127+
git pull # other next step workflows may push changes before
128+
git rm .github/workflows/next_steps.yml
129+
git commit -am "Cleanup automated next steps issue generator"
130+
git push
131+
{%- endif %}

0 commit comments

Comments
 (0)