File tree Expand file tree Collapse file tree 9 files changed +70
-16
lines changed Expand file tree Collapse file tree 9 files changed +70
-16
lines changed Original file line number Diff line number Diff line change 2121        with :
2222          enable-cache : true 
2323
24-       - name : Install justfile 
25-         run : sudo apt-get  install -y just 
24+       - name : Install justfile and zsh  
25+         run : sudo apt install -y just zsh  
2626
2727      - name : Test and check template creation 
2828        run : just test 
Original file line number Diff line number Diff line change @@ -34,6 +34,18 @@ spaid_gh_set_repo_settings -h
3434spaid_gh_ruleset_basic_protect_main -h
3535``` 
3636
37+ Some configuration is needed after copying this template to a new
38+ repository, including configuration external to the repository.
39+ 
40+ -    The template file ` .github/workflows/release-package.yml `  requires
41+     installing the
42+     [ auto-release-token] ( https://github.com/apps/auto-release-token ) 
43+     GitHub App to be installed, as well as a GitHub secret called
44+     ` UPDATE_VERSION_TOKEN `  and a variable called ` UPDATE_VERSION_APP_ID ` 
45+     to be set up in the repository (or organization) settings. See this
46+     [ guide] ( https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens ) 
47+     for more details on how to set this up.
48+ 
3749## Features  
3850
3951-    Use [ uv] ( https://docs.astral.sh/uv/ )  to manage the Data Package.
Original file line number Diff line number Diff line change 11_subdirectory : template 
22
33#  Questions:
4- 
54package_github_repo :
65  type : str 
76  default : " NA" 
Original file line number Diff line number Diff line change @@ -31,21 +31,20 @@ check-spelling:
3131
3232test : 
3333  #!/ bin/ zsh
34-   temp_dir= " _temp/test-data-package "
35-   rm -rf $temp_dir 
36-   mkdir -p $temp_dir 
34+   test_dir= " $(pwd)/_temp "
35+   test_name= " test-data-package" 
36+   rm -rf $test_dir 
3737  # vcs-ref means the current commit/head, not a tag. 
3838  # `.` means the current directory contains the template. 
39-   uvx copier copy --vcs-ref=HEAD . $temp_dir  \
39+   uvx copier copy --vcs-ref=HEAD . $test_dir / $test_name  \
4040    - -defaults \
41-     - -data package_abbrev=  " test-data-package" 
42-     - -data package_github =" first-last/test-data-package "
41+     - -data package_abbrev=$test_name  \
42+     - -data package_github_repo =" first-last/${test_name} "
4343    - -data author_given_name=" First"
4444    - -data author_family_name=" Last"
4545    - -data author_email=
" [email protected] " 4646  # TODO: Other checks/tests? 
4747
4848cleanup : 
4949  #!/ bin/ zsh
50-   temp_dir=$(" _temp/test-data-package"
51-   rm -rf $temp_dir
50+   rm -rf _temp
Original file line number Diff line number Diff line change 1+ [tool .commitizen ]
2+ bump_message  = " build(version): :bookmark: update version from $current_version to $new_version [skip ci]" 
3+ update_changelog_on_bump  = true 
4+ version_provider  = " uv" 
5+ version_files  = [
6+   " pyproject.toml:version" 
7+   " scripts/properties.py:version" 
8+ ]
9+ #  Don't regenerate the changelog on every update
10+ changelog_incremental  = true 
Original file line number Diff line number Diff line change 1919    uses: seedcase-project/.github/.github/workflows/reusable-add-to-project.yml@main
2020    with:
2121      board-number: 18
22-       app-id: ${{ vars.ADD_TO_BOARD_APP_ID }}
22+       app-id: {{ ' ${{ vars.ADD_TO_BOARD_APP_ID }}'  }}
2323    secrets:
24-       add-to-board-token: ${{ secrets.ADD_TO_BOARD }}
25-       gh-token: ${{ secrets.GITHUB_TOKEN }}
24+       add-to-board-token: {{ ' ${{ secrets.ADD_TO_BOARD }}'  }}
25+       gh-token: {{ ' ${{ secrets.GITHUB_TOKEN }}'  }}
Original file line number Diff line number Diff line change 1+ name : Release package 
2+ 
3+ on :
4+   push :
5+     branches :
6+       - main 
7+ 
8+ #  Limit token permissions for security
9+ permissions : read-all 
10+ 
11+ jobs :
12+   release :
13+     #  This job outputs env variables `previous_version` and `current_version`.
14+     #  Only give permissions for this job.
15+     permissions :
16+       contents : write 
17+     uses : seedcase-project/.github/.github/workflows/reusable-release-project.yml@main 
18+     with :
19+       app-id : ${{ vars.UPDATE_VERSION_APP_ID }} 
20+     secrets :
21+       update-version-gh-token : ${{ secrets.UPDATE_VERSION_TOKEN }} 
Original file line number Diff line number Diff line change 1+ 
12## Post-setup steps
23
34- Run `just list-todos` to get a list of TODO items you need to fill out.
5+ 
6+ ## Versioning and changelog
7+ 
8+ This project uses
9+ [Commitizen](https://commitizen-tools.github.io/commitizen/) to update
10+ versions and generate changelogs. Based on the [Conventional
11+ Commits](https://www.conventionalcommits.org/en/v1.0.0/) message, it
12+ will automatically update the version in both `pyproject.toml` and
13+ `datapackage.json`. The [Data Package](https://datapackage.org/)
14+ standard suggests using their version of [Semantic
15+ Versioning](https://datapackage.org/recipes/data-package-version/). So
16+ follow these conventions when making commits to this repository.
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ dependencies = [
2121    "seedcase-sprout>=0.46.3",
2222]
2323
24- {{  if package_github  != "NA" } }
24+ {%   if  package_github_repo  != "NA"  % }
2525[project.urls]
2626issues = "https://github.com/{{ package_github_repo }}/issues"
2727repository = "https://github.com/{{ package_github_repo }}"
28- {{  endif } }
28+ {%   endif  % }
2929
3030[dependency-groups]
3131dev = [
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments