Skip to content

Commit

Permalink
Bump cookiecutter template to 6540de (#60)
Browse files Browse the repository at this point in the history
# Changes

- bumped cookiecutter template to
robert-koch-institut/mex-template@6540de

---------

Signed-off-by: Nicolas Drebenstedt <[email protected]>
Co-authored-by: Nicolas Drebenstedt <[email protected]>
  • Loading branch information
RKIMetadataExchange and cutoffthetop authored May 29, 2024
1 parent 5ebf73c commit 0ca1f14
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/robert-koch-institut/mex-template",
"commit": "25c36c49159f9309b55815b6606a8dfb66228858",
"commit": "6540de79babb2c9b8569fe8e85871c088c609816",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

run-name: release version ${{ inputs.version }} by @${{ github.actor }}

on:
workflow_dispatch:
branches: ["main"]
inputs:
version:
type: choice
description: 'part of the project version to update'
options:
- major
- minor
- patch
required: true

env:
PIP_NO_OPTION: on
PIP_NO_CLEAN: on
PIP_PREFER_BINARY: on

permissions:
contents: write

concurrency:
group: "release"
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Cache requirements
uses: actions/cache@v4
env:
cache-name: cache-requirements
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.cache-name }}-
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install requirements
run: make setup

- name: Release new version
run: |
git config --global user.name 'RKIMetadataExchange'
git config --global user.email '[email protected]'
pdm release ${{ inputs.version }}
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,5 @@ components of the MEx project are open-sourced under the same license as well.

### creating release

- update version in `pyproject.toml` and `CHANGELOG.md`
- commit update `git commit --message "..."`
- create a tag `git tag ...`
- push `git push --follow-tags`
- run `pdm release RULE` to release a new version where RULE determines which part of
the version to update and is one of `major`, `minor`, `patch`.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cruft==2.15.0
pdm==2.15.2
mex-release @ git+https://github.com/robert-koch-institut/mex-release.git
pdm==2.15.3
pre-commit==3.7.1
wheel==0.43.0

0 comments on commit 0ca1f14

Please sign in to comment.