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

Other #1389

Closed
wants to merge 3 commits into from
Closed

Other #1389

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
16 changes: 16 additions & 0 deletions .github/GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mode: ContinuousDelivery
assembly-versioning-format: '{Major}.{Minor}.{Patch}.dev{CommitsSinceVersionSource}'
branches:
develop:
regex: ^dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: dev
increment: None
prevent-increment-of-merged-branch-version: false
track-merge-target: true
source-branches: []
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0

46 changes: 46 additions & 0 deletions .github/workflows/auto-dev-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
pull_request:
branches:
- develop-test
types: [ closed ]
name: auto-dev-version

jobs:
auto-dev-version:
if: github.repository == 'fbenke-pik/remind' && github.event.pull_request.merged == true
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
configFilePath: .github/GitVersion.yml

- name: Update CITATION.cff and config/default.cfg with version and date
run: |
sed -i 's/^version:.*$/version: "${{ steps.gitversion.outputs.assemblySemVer }}"/' CITATION.cff
sed -i "s/^date-released:.*$/date-released: $(date --iso)/" CITATION.cff
sed -i 's/^cfg$model_version <-.*$/cfg$model_version <- "${{ steps.gitversion.outputs.assemblySemVer }}"/' config/default.cfg

- name: Commit changes to CITATION.cff
uses: EndBug/add-and-commit@v9
with:
add: '["CITATION.cff", "config/default.cfg"]'
author_name: REMIND Research Software Engineering
author_email: [email protected]
message: 'Release development version ${{ steps.gitversion.outputs.assemblySemVer }}'
tag: 'v${{ steps.gitversion.outputs.assemblySemVer }}'
pathspec_error_handling: exitImmediately
2 changes: 1 addition & 1 deletion config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cfg$model_name <- "REMIND"
cfg$validationmodel_name <- "VALIDATIONREMIND"

#### model version of the overall model (used for run statistics only).
# Use extension "-rc" for release candidate and "-dev" for developer version
# automatically generated for development versions, updated by hand for releases
cfg$model_version <- "3.2.2-dev"

#### settings ####
Expand Down
1 change: 1 addition & 0 deletions foo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
My new change
Loading