Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add next steps workflows to a single file #657

Merged
merged 9 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions template/{% if AddCitation %}CITATION.cff{% endif %}.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@
cff-version: "1.2.0"
title: "{{ package_name }}"
authors:
-
family-names: {{ full_name.replace('\"', '\\\"').split(' ')[-1] }}
- family-names: {{ full_name.replace('\"', '\\\"').split(' ')[-1] }}
given-names: {{ full_name.replace('\"', '\\\"').split(' ')[0] }}
orcid: "https://orcid.org/0000-0000-0000-0000"
date-released: 20??-MM-DD
doi: <insert your DOI here>
date-released: {{ '%Y-%m-%d' | strftime }}
version: "{{ version }}"
repository-code: "{{ repository_url }}"
keywords:
{%- for item in keywords.split(',') %}
- "{{ item }}"
{%- endfor %}
message: "If you use this software, please cite it using these metadata."
{{ { "Apache Software License 2.0": "license: Apache-2.0",
"MIT license": "license: MIT",
"BSD license": "license: BSD-3-Clause",
"ISC license": "license: ISC",
"GNU General Public License v3 or later": "license: GPL-3.0-or-later",
"Not open source": ""
}[license] }}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
on: [push]
permissions:
contents: write
issues: write
name: Create GitHub issues
jobs:
next_steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

{%- if AddCitation %}
- name: Create citation data issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
with:
filename: .github/workflows/next_steps_citation_issue.md
id: citation
- name: List created issues
run: |
echo "Created issues that must be completed to have fully working Python package:
* Citation data {{ '${{' }} steps.citation.outputs.url {{ '}}' }}"
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_citation_issue.md
git commit -am "Cleanup automated next steps issue generator for citation"
git push
{%- endif %}

{%- if AddLinting %}
- name: Create linting issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
with:
filename: .github/workflows/next_steps_linting_issue.md
id: linting
- name: List created issues
run: |
echo "Created issues that must be completed to have fully working Python package:
* Linting fixes {{ '${{' }} steps.linting.outputs.url {{ '}}' }}"
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_linting_issue.md
git commit -am "Cleanup automated next steps issue generator"
git push
{%- endif %}

{%- if AddOnlineDocumentation %}
- name: Create online documentation issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
with:
filename: .github/workflows/next_steps_online_documentation_issue.md
id: readthedocs
- name: List created issues
run: |
echo "Created issues that must be completed to have fully working Python package:
* Read the Docs instructions {{ '${{' }} steps.readthedocs.outputs.url {{ '}}' }}"
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_online_documentation_issue.md
git commit -am "Cleanup automated next steps issue generator for online documentation"
git push
{%- endif %}

{%- if AddZenodo %}
- name: Create Zenodo integration issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
with:
filename: .github/workflows/next_steps_zenodo_issue.md
id: zenodo
- name: List created issues
run: |
echo "Created issues that must be completed to have fully working Python package:
* Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}"
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_zenodo_issue.md
git commit -am "Cleanup automated next steps issue generator for zenodo"
git push
{%- endif %}

{%- if AddSonarCloud %}
- name: Create Sonarcloud issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: {{ '${{' }}secrets.GITHUB_TOKEN{{ '}}' }}
with:
filename: .github/workflows/next_steps_sonarcloud_issue.md
id: sonarcloud
- name: List created issues
run: |
echo "Created issues that must be completed to have fully working Python package:
* Sonarcloud integration {{ '${{' }} steps.sonarcloud.outputs.url {{ '}}' }}"
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_sonarcloud_issue.md
git commit -am "Cleanup automated next steps issue generator for sonarcloud"
git push
{%- endif %}

{%- if AddCitation or AddLinting or AddOnlineDocumentation or AddZenodo or AddSonarCloud %}
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email '[email protected]'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps.yml
git commit -am "Cleanup automated next steps issue generator"
git push
{%- endif %}