diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml new file mode 100644 index 0000000..1a93711 --- /dev/null +++ b/.github/workflows/bumpversion.yml @@ -0,0 +1,46 @@ +name: Update file on PR merge +on: + pull_request: + branches: + - main + types: closed + +jobs: + update_version: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + with: + # Fetch full depth, otherwise the last step overwrites the last commit's parent, essentially removing the graph. + fetch-depth: 0 + + - name: GenerateTag + id: name_tag + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + create_annotated_tag: true + default_bump: patch + dry_run: true + tag_prefix: cprnc- + - name: Update version.txt + run: | + echo "${{ steps.name_tag.outputs.new_tag }}" > version.txt + - name: Amend the last commit + run: | + git config --global user.email "gitbot@openrct2.org" + git config --global user.name "OpenRCT2 git bot" + git commit -a --amend --no-edit + git push --force-with-lease + echo "Complete"name: Bump version + - name: Bump version and push tag + id: really_tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + create_annotated_tag: true + default_bump: patch + dry_run: false + tag_prefix: cprnc- diff --git a/.github/workflows/bumpversion.yml~ b/.github/workflows/bumpversion.yml~ new file mode 100644 index 0000000..a37084a --- /dev/null +++ b/.github/workflows/bumpversion.yml~ @@ -0,0 +1,46 @@ +name: Update file on PR merge +on: + pull_request: + branches: + - main + types: closed + +jobs: + update_version: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + with: + # Fetch full depth, otherwise the last step overwrites the last commit's parent, essentially removing the graph. + fetch-depth: 0 + + - name: GenerateTag + id: name_tag + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + create_annotated_tag: true + default_bump: patch + dry_run: true + tag_prefix: manic- + - name: Update version.txt + run: | + echo "${{ steps.name_tag.outputs.new_tag }}" > version.txt + - name: Amend the last commit + run: | + git config --global user.email "gitbot@openrct2.org" + git config --global user.name "OpenRCT2 git bot" + git commit -a --amend --no-edit + git push --force-with-lease + echo "Complete"name: Bump version + - name: Bump version and push tag + id: really_tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + create_annotated_tag: true + default_bump: patch + dry_run: false + tag_prefix: manic- diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml new file mode 100644 index 0000000..2b2ea62 --- /dev/null +++ b/.github/workflows/runtests.yml @@ -0,0 +1,24 @@ +name: test cprnc +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses" actions/checkout@v3 + - name: Installs + run: | + set -x + sudo apt-get update + sudo apt-get install netcdf-bin gfortran libnetcdff-dev + - name: cmake build + shell: bash + run: | + mkdir build + cd build + cmake -Wno-dev ../ + make VERBOSE=1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c62995 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +CPRNC is a fortran program used to compare netcdf data files. +It was developed and has evolved for use with CESM. +