From a5b8b6720181e96f6440f9122be38cecbc3793eb Mon Sep 17 00:00:00 2001 From: Ryan Mulhall Date: Thu, 13 Oct 2022 14:42:54 -0400 Subject: [PATCH 1/4] add initial action for automated version changes --- .github/workflows/version.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/version.yml diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml new file mode 100644 index 0000000000..9f7e941589 --- /dev/null +++ b/.github/workflows/version.yml @@ -0,0 +1,10 @@ +on: release +jobs: + add-dev-to-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Append version with dev + run: sed -i '/20[0-9][0-9]\.[0-9][0-9]/ s/]/-dev]/' configure.ac + - name: Create pull request + uses: peter-evans/create-pull-request@v4 From fa779930679f4d2ca2c1df8de1b2944277f99d00 Mon Sep 17 00:00:00 2001 From: Ryan Mulhall Date: Thu, 13 Oct 2022 14:55:14 -0400 Subject: [PATCH 2/4] add action options --- .github/workflows/version.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 9f7e941589..237ee58312 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -8,3 +8,8 @@ jobs: run: sed -i '/20[0-9][0-9]\.[0-9][0-9]/ s/]/-dev]/' configure.ac - name: Create pull request uses: peter-evans/create-pull-request@v4 + with: + base: main # creates a new branch off of main + branch: add-dev-post-release # name of the created branch + branch-suffix: timestamp # add a timestamp to branch name + delete-branch: true # delete afer merge From fa2a97e96c106406035f544771ccd8a4f86cea43 Mon Sep 17 00:00:00 2001 From: Ryan Mulhall Date: Thu, 13 Oct 2022 16:05:16 -0400 Subject: [PATCH 3/4] fix release trigger running more than once --- .github/workflows/update_docs.yml | 6 ++++-- .github/workflows/version.yml | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml index aea7b04224..6a4b4bf917 100644 --- a/.github/workflows/update_docs.yml +++ b/.github/workflows/update_docs.yml @@ -1,8 +1,10 @@ name: Generate and deploy documentation on GH pages # update on releases or when triggered manually(must have write access) -on: [release, workflow_dispatch] - +on: + release: + types: [published] + workflow_dispatch: jobs: update_docs: runs-on: ubuntu-latest diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 237ee58312..db37adf2e9 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -1,4 +1,6 @@ -on: release +on: + release: + types: [published] jobs: add-dev-to-version: runs-on: ubuntu-latest @@ -13,3 +15,6 @@ jobs: branch: add-dev-post-release # name of the created branch branch-suffix: timestamp # add a timestamp to branch name delete-branch: true # delete afer merge + title: Append dev to version number post-release + body: automated change, adds '-dev' to the version number upon releases + reviewers: rem1776 From a2dd1330f550e24f0813e99d976761488e53d6d9 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 13 Oct 2022 20:08:34 +0000 Subject: [PATCH 4/4] [create-pull-request] automated change --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2a4c15f1e7..b0b8bb309d 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ AC_PREREQ([2.69]) # Initialize with name, version, and support email address. AC_INIT([GFDL FMS Library], - [2022.04.00], + [2022.04.00-dev], [gfdl.climate.model.info@noaa.gov], [FMS], [https://www.github.com/NOAA-GFDL/FMS])