From 3c445a8880745f2c5e0974bf37fefd7dddae7a1c Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Wed, 28 Sep 2022 22:23:12 +0100 Subject: [PATCH 01/14] testing actions --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17aa896..046c289 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,7 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.prerelease.outputs.version }} + release_body: ${{ steps.prerelease.outputs.body }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -18,6 +19,7 @@ jobs: tag_prefix: "" bump_version_scheme: norelease dry_run: true + use_github_release_notes: true create_release: runs-on: ubuntu-latest @@ -45,4 +47,4 @@ jobs: with: tag: ${{ jobs.check_for_release.outputs.version }} name: ${{ jobs.check_for_release.outputs.version }} - body: ${{ jobs.check_for_release.outputs.version }} \ No newline at end of file + body: ${{ jobs.check_for_release.outputs.release_body }} \ No newline at end of file From b441ada11141b8c5b917aeee32f12501ddece072 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Wed, 28 Sep 2022 22:29:22 +0100 Subject: [PATCH 02/14] testing actions --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 046c289..5a8bb1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ on: push: branches: - main - jobs: check_for_release: runs-on: ubuntu-latest @@ -22,8 +21,9 @@ jobs: use_github_release_notes: true create_release: + needs: check_for_release runs-on: ubuntu-latest - if: jobs.check_for_release.outputs.version + if: needs.check_for_release.outputs.version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -32,10 +32,10 @@ jobs: - name: Bump the version numbers run: | - echo "Creating release version ${{ jobs.check_for_release.outputs.version }}" + echo "Creating release version ${{ needs.check_for_release.outputs.version }}" git checkout - sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ jobs.check_for_release.outputs.version }}/g" ./defo.txt - sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ jobs.check_for_release.outputs.version }}/g" ./pie.txt + sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ needs.check_for_release.outputs.version }}/g" ./defo.txt + sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ needs.check_for_release.outputs.version }}/g" ./pie.txt git config user.name "Github Actions" git config user.email "<>" git add . @@ -45,6 +45,6 @@ jobs: - name: Create a GitHub release uses: ncipollo/release-action@v1 with: - tag: ${{ jobs.check_for_release.outputs.version }} - name: ${{ jobs.check_for_release.outputs.version }} - body: ${{ jobs.check_for_release.outputs.release_body }} \ No newline at end of file + tag: ${{ needs.check_for_release.outputs.version }} + name: ${{ needs.check_for_release.outputs.version }} + body: ${{ needs.check_for_release.outputs.release_body }} \ No newline at end of file From 421497d7552ab33aa138ded102ca8b68e7f8159f Mon Sep 17 00:00:00 2001 From: Github Actions <> Date: Wed, 28 Sep 2022 21:31:58 +0000 Subject: [PATCH 03/14] Version Numbering --- defo.txt | 2 +- pie.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defo.txt b/defo.txt index a26c91a..f5494dc 100644 --- a/defo.txt +++ b/defo.txt @@ -1,6 +1,6 @@ { "name": "ascott-analytical-chambers-test-standards", - "version": "5.0.0", + "version": "5.1.0", "main": "index.js", "repository": "git@bitbucket.org:pieweb/ascott-analytical-chambers-test-standards.git", "author": "Neil Pie ", diff --git a/pie.txt b/pie.txt index ac74ec9..ea57b36 100644 --- a/pie.txt +++ b/pie.txt @@ -1,6 +1,6 @@ hello -Version: 5.0.0 +Version: 5.1.0 Or so it would seem -Version: 1.0 +Version: 5.1.0 From cb34b8a385a3cae08a732ea33be3cd7e9f6196b6 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Wed, 28 Sep 2022 22:55:35 +0100 Subject: [PATCH 04/14] documenting action --- .github/workflows/main.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a8bb1d..8bcca77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,12 @@ on: branches: - main jobs: + # This job utilises a marketplace action tag to automatically create a release when a pull request + # is labelled as release:major, release:minor or release:patch (it can also be controlled via commit + # message - see their docs for more info) + # + # Unfortunately it doesn't expose a point at which we can change the files before the Version is + # tagged, so we run it in 'dry-run' mode and expose its outputs for use later if required check_for_release: runs-on: ubuntu-latest outputs: @@ -19,7 +25,13 @@ jobs: bump_version_scheme: norelease dry_run: true use_github_release_notes: true - + # This job only runs if the previous job detects that a new release is required. It checks out the + # main branch of the repo, runs some string replaces via `sed` to bump the version numbers. These + # may be changed to suit your project if required. + # + # @TODO Investigate the possibility of adding a build step between Bump the Version Numbers and + # Create a Github Release. The release action allows for zip artifacts to be uploaded, which may + # be extremely appropriate for distribution. create_release: needs: check_for_release runs-on: ubuntu-latest @@ -34,8 +46,9 @@ jobs: run: | echo "Creating release version ${{ needs.check_for_release.outputs.version }}" git checkout - sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ needs.check_for_release.outputs.version }}/g" ./defo.txt - sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ needs.check_for_release.outputs.version }}/g" ./pie.txt + sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ needs.check_for_release.outputs.version }}/g" ./package.json + sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ needs.check_for_release.outputs.version }}/g" ./plugin.php + sed -i "s/\[Unreleased\]/\[${{ needs.check_for_release.outputs.version }}\] /g" ./changelog.md git config user.name "Github Actions" git config user.email "<>" git add . From 7ec62cfe7833c5691416cbd4db703cab83acdaa8 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 06:10:03 +0100 Subject: [PATCH 05/14] adding date to str_Replace --- .github/workflows/main.yml | 8 ++++++-- changelog.md | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 changelog.md diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bcca77..88bf1be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,14 +41,18 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v3 - + + - name: Get current date + id: get_date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Bump the version numbers run: | echo "Creating release version ${{ needs.check_for_release.outputs.version }}" git checkout sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ needs.check_for_release.outputs.version }}/g" ./package.json sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ needs.check_for_release.outputs.version }}/g" ./plugin.php - sed -i "s/\[Unreleased\]/\[${{ needs.check_for_release.outputs.version }}\] /g" ./changelog.md + sed -i "s/\[Unreleased\]/\[${{ needs.check_for_release.outputs.version }}\] ${{steps.get_date.outputs.date}} /g" ./changelog.md git config user.name "Github Actions" git config user.email "<>" git add . diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..a8d47dc --- /dev/null +++ b/changelog.md @@ -0,0 +1,10 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added +- Initial functionality pre-changelog \ No newline at end of file From 9d916c6e55613f75ed831965b35c4fb101c24db0 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 06:14:38 +0100 Subject: [PATCH 06/14] adding date to str_Replace --- changelog.md | 5 ++++- defo.txt => package.json | 0 pie.txt | 6 ------ plugin.php | 8 ++++++++ 4 files changed, 12 insertions(+), 7 deletions(-) rename defo.txt => package.json (100%) delete mode 100644 pie.txt create mode 100644 plugin.php diff --git a/changelog.md b/changelog.md index a8d47dc..4e9fe60 100644 --- a/changelog.md +++ b/changelog.md @@ -7,4 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- Initial functionality pre-changelog \ No newline at end of file +- Initial functionality pre-changelog +- Adding a bit more +### Changed +- moved txt files to appropriately named files \ No newline at end of file diff --git a/defo.txt b/package.json similarity index 100% rename from defo.txt rename to package.json diff --git a/pie.txt b/pie.txt deleted file mode 100644 index ea57b36..0000000 --- a/pie.txt +++ /dev/null @@ -1,6 +0,0 @@ -hello - -Version: 5.1.0 -Or so it would seem - -Version: 5.1.0 diff --git a/plugin.php b/plugin.php new file mode 100644 index 0000000..a5e6c95 --- /dev/null +++ b/plugin.php @@ -0,0 +1,8 @@ + Date: Thu, 29 Sep 2022 05:16:21 +0000 Subject: [PATCH 07/14] Version Numbering --- changelog.md | 2 +- package.json | 2 +- plugin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 4e9fe60..af3d590 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [5.1.1] 2022-09-29 ### Added - Initial functionality pre-changelog diff --git a/package.json b/package.json index f5494dc..4660b5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ascott-analytical-chambers-test-standards", - "version": "5.1.0", + "version": "5.1.1", "main": "index.js", "repository": "git@bitbucket.org:pieweb/ascott-analytical-chambers-test-standards.git", "author": "Neil Pie ", diff --git a/plugin.php b/plugin.php index a5e6c95..9099ada 100644 --- a/plugin.php +++ b/plugin.php @@ -2,7 +2,7 @@ /* Plugin Name: Anything Description: A bespoke plugin to add all functionality -Version: 2.3.2 +Version: 5.1.1 Author: The team at PIE Author URI: http://pie.co.de */ From 94337db534e64856279708d611704bad7524854c Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:09:17 +0100 Subject: [PATCH 08/14] Update coolFile --- coolFile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/coolFile b/coolFile index 8f57830..6a69f92 100644 --- a/coolFile +++ b/coolFile @@ -1,3 +1 @@ -cool -really cool -really really really cool +f From a786a2b686cbfe3ecd7b9630f23d4eeb1d0211ef Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:11:06 +0100 Subject: [PATCH 09/14] Update changelog.md --- changelog.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index af3d590..f026437 100644 --- a/changelog.md +++ b/changelog.md @@ -4,10 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +##[Unreleased] +### Changed +- Removed text from coolfile + ## [5.1.1] 2022-09-29 ### Added - Initial functionality pre-changelog - Adding a bit more ### Changed -- moved txt files to appropriately named files \ No newline at end of file +- moved txt files to appropriately named files From 371354fe1e0b389e1ff050355112561b2c133da8 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:11:51 +0100 Subject: [PATCH 10/14] Update changelog.md --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index f026437..d24ad03 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -##[Unreleased] +## [Unreleased] ### Changed - Removed text from coolfile From 967fad7bf55e43a76077dbe75ef22244520ec6cf Mon Sep 17 00:00:00 2001 From: Github Actions <> Date: Thu, 29 Sep 2022 10:12:40 +0000 Subject: [PATCH 11/14] Version Numbering --- changelog.md | 2 +- package.json | 2 +- plugin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index d24ad03..d376ffb 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [6.0.0] 2022-09-29 ### Changed - Removed text from coolfile diff --git a/package.json b/package.json index 4660b5e..9e91cc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ascott-analytical-chambers-test-standards", - "version": "5.1.1", + "version": "6.0.0", "main": "index.js", "repository": "git@bitbucket.org:pieweb/ascott-analytical-chambers-test-standards.git", "author": "Neil Pie ", diff --git a/plugin.php b/plugin.php index 9099ada..babb6ea 100644 --- a/plugin.php +++ b/plugin.php @@ -2,7 +2,7 @@ /* Plugin Name: Anything Description: A bespoke plugin to add all functionality -Version: 5.1.1 +Version: 6.0.0 Author: The team at PIE Author URI: http://pie.co.de */ From 164d6e81b44c797d96e51e06e73cabd3bee32959 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:18:07 +0100 Subject: [PATCH 12/14] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88bf1be..dfb6b2e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,6 @@ jobs: - name: Bump the version numbers run: | echo "Creating release version ${{ needs.check_for_release.outputs.version }}" - git checkout sed -i "s/version\":\ \"[0-9]\+\.\?[0-9]*\.\?[0-9]*/version\":\ \"${{ needs.check_for_release.outputs.version }}/g" ./package.json sed -i "s/Version:\ [0-9]\+\.\?[0-9]*\.\?[0-9]*/Version:\ ${{ needs.check_for_release.outputs.version }}/g" ./plugin.php sed -i "s/\[Unreleased\]/\[${{ needs.check_for_release.outputs.version }}\] ${{steps.get_date.outputs.date}} /g" ./changelog.md @@ -64,4 +63,4 @@ jobs: with: tag: ${{ needs.check_for_release.outputs.version }} name: ${{ needs.check_for_release.outputs.version }} - body: ${{ needs.check_for_release.outputs.release_body }} \ No newline at end of file + body: ${{ needs.check_for_release.outputs.release_body }} From 1b124111af8625d86e41c1933b8aee72994416a4 Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:19:35 +0100 Subject: [PATCH 13/14] Update coolFile --- coolFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolFile b/coolFile index 6a69f92..a97aaef 100644 --- a/coolFile +++ b/coolFile @@ -1 +1 @@ -f +fghijklmnop From d0f0bb5d75fc7e3116a435700889670ceeb7668b Mon Sep 17 00:00:00 2001 From: Neil Pie Date: Thu, 29 Sep 2022 11:21:40 +0100 Subject: [PATCH 14/14] Update changelog.md --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index d376ffb..0322e4e 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Added +- Some text to Coolfile + ## [6.0.0] 2022-09-29 ### Changed - Removed text from coolfile