From e3e05d98fe344ae802f6d69be478bb219a3cd77b Mon Sep 17 00:00:00 2001
From: Celine Souchet <celine.souchet@bonitasoft.com>
Date: Wed, 1 Sep 2021 11:19:33 +0200
Subject: [PATCH 1/6] Update doc for release & BPMN visualization update

---
 CONTRIBUTING.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 65 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 34b4d29..28aa74d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -13,7 +13,7 @@ There are many ways to contribute:
 - improving the README & documentation
 - writing code which can be incorporated into `bpmn-visualization-R` itself
 
-## Code and documentation changes guidelines
+### Code and documentation changes guidelines
 
 For all contributions, please respect the following guidelines:
 
@@ -100,6 +100,10 @@ git push --force-with-lease 25-customize_overlays
 
 At this point, you're ready to make your changes! Feel free to ask for help. Everyone is a beginner at first :smile_cat:
 
+## BPMN Visualization update
+
+- Change [bpmn-visualization.min.js](inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js)
+- Update the version of `bpmn-visualization` in [bpmnVisualization.yaml](inst/htmlwidgets/bpmnVisualization.yaml)
 
 ## Maintainers
 
@@ -111,3 +115,63 @@ A PR can only be merged into master by a maintainer, if all of these conditions
 * It has been approved by at least two maintainers. If it was a maintainer who opened the PR, only one extra approval is needed.
 * It has no requested changes.
 * It is up to date with current master.
+
+### Release process
+
+Maintainers need to perform the following actions **in the order described here** to push out a release.
+
+#### Verify the version in [DESCRIPTION](./DESCRIPTION) file
+
+Create a new PR and merge it, if the version in the [DESCRIPTION](./DESCRIPTION) file is not good.
+
+#### GitHub issues and milestones
+
+**Note:** we always put issues related to a version in a Milestone whose name matches the version.
+
+- Ensure the name of the milestone used for the new release version matches the name of the tag/version that has just been pushed. Renamed it if needed.
+- Clean this opened milestone if some issues are still opened (move them to a new one or discard milestone from them)
+- Close the milestone
+
+#### Prepare the GitHub Release Notes
+
+- Open [github releases](https://github.com/process-analytics/bpmn-visualization-R/releases)
+- Create a new draft release and name it `Next` (the name is not relevant and will be replaced automatically later).
+  This ensures that development can continue without impacting the writing of the content of the in progress release. That way,
+  if a PR is merged, `release-drafter` will update the `Next` draft release keeping the in-progress release untouched.
+- The draft release for the newly tagged version should already exist:
+   - [release-drafter](https://github.com/release-drafter/release-drafter) creates or updates draft release for the
+     next version each time a pull request is merged to the `master` branch.
+   - create a new release if it is missing or rename the existing one to match .
+- Assign the new tag as release target and save the draft (this should have already been managed by `release-drafter`)
+- Ensure that `This is a pre-release` is unchecked (except if we are releasing alpha, beta, rc, ...)
+- In the release description (check previous releases as a source of inspiration)
+   - at least add/update a link to the related milestone
+   - put screenshots/gif of the new features
+- At any time, you can save the draft.
+
+#### Release on GitHub (tag)
+
+- Open the draft release note in [github releases](https://github.com/process-analytics/bpmn-visualization-R/releases)
+- Verify the tag version as the same as the release note.
+- Published the release **only when you are done** with the release content. 
+
+#### Publish the new version on CRAN
+
+- Pull the new version created by the release workflow: `git pull origin`
+- Ensure you are on the last tag locally: `git checkout vX.Y.Z`
+- :warning: TODO: Explain the procedure to publish on CRAN
+
+### Communicate about the release
+
+#### Twitter
+
+You can use this template:
+
+> 📣 BPMN Visualization - R package {version} is out! 🎉
+>
+> ===> some short description here <===
+>
+> #bpmnvisualization #bpmn #visualization #R #opensource
+>
+> https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v{version}
+

From 9dd704808d5ffb370d1edad560446be60325f797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Souchet=20C=C3=A9line?=
 <4921914+csouchet@users.noreply.github.com>
Date: Wed, 1 Sep 2021 11:43:14 +0200
Subject: [PATCH 2/6] Apply suggestions from code review

Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com>
---
 CONTRIBUTING.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 28aa74d..0656fba 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -100,9 +100,9 @@ git push --force-with-lease 25-customize_overlays
 
 At this point, you're ready to make your changes! Feel free to ask for help. Everyone is a beginner at first :smile_cat:
 
-## BPMN Visualization update
+## bpmn-visualization-js update
 
-- Change [bpmn-visualization.min.js](inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js)
+- Change [bpmn-visualization.min.js](inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js). The file can be retrieved from [jsdelivr](https://www.jsdelivr.com/package/npm/bpmn-visualization) or [unpkg](https://unpkg.com/browse/bpmn-visualization/).
 - Update the version of `bpmn-visualization` in [bpmnVisualization.yaml](inst/htmlwidgets/bpmnVisualization.yaml)
 
 ## Maintainers

From cb8e9518f2e10e100b480a367078d839d16bbddd Mon Sep 17 00:00:00 2001
From: Celine Souchet <celine.souchet@bonitasoft.com>
Date: Wed, 1 Sep 2021 11:44:18 +0200
Subject: [PATCH 3/6] Remove milestone part

---
 CONTRIBUTING.md | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0656fba..d77806a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -124,14 +124,6 @@ Maintainers need to perform the following actions **in the order described here*
 
 Create a new PR and merge it, if the version in the [DESCRIPTION](./DESCRIPTION) file is not good.
 
-#### GitHub issues and milestones
-
-**Note:** we always put issues related to a version in a Milestone whose name matches the version.
-
-- Ensure the name of the milestone used for the new release version matches the name of the tag/version that has just been pushed. Renamed it if needed.
-- Clean this opened milestone if some issues are still opened (move them to a new one or discard milestone from them)
-- Close the milestone
-
 #### Prepare the GitHub Release Notes
 
 - Open [github releases](https://github.com/process-analytics/bpmn-visualization-R/releases)
@@ -141,12 +133,10 @@ Create a new PR and merge it, if the version in the [DESCRIPTION](./DESCRIPTION)
 - The draft release for the newly tagged version should already exist:
    - [release-drafter](https://github.com/release-drafter/release-drafter) creates or updates draft release for the
      next version each time a pull request is merged to the `master` branch.
-   - create a new release if it is missing or rename the existing one to match .
+   - create a new release if it is missing or rename the existing one to match.
 - Assign the new tag as release target and save the draft (this should have already been managed by `release-drafter`)
 - Ensure that `This is a pre-release` is unchecked (except if we are releasing alpha, beta, rc, ...)
-- In the release description (check previous releases as a source of inspiration)
-   - at least add/update a link to the related milestone
-   - put screenshots/gif of the new features
+- In the release description (check previous releases as a source of inspiration), put screenshots/gif of the new features.
 - At any time, you can save the draft.
 
 #### Release on GitHub (tag)

From 56f418b608ed59ca6b78fdb690cfbd64b4928701 Mon Sep 17 00:00:00 2001
From: Celine Souchet <celine.souchet@bonitasoft.com>
Date: Wed, 1 Sep 2021 11:46:01 +0200
Subject: [PATCH 4/6] update hashtags in tweet template

---
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d77806a..1b8f13a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -161,7 +161,7 @@ You can use this template:
 >
 > ===> some short description here <===
 >
-> #bpmnvisualization #bpmn #visualization #R #opensource
+> #bpmnvisualization #bpmn #visualization #R #RLang #programming #opensource
 >
 > https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v{version}
 

From 1df0b7f79d4f6b97c235eb0551dcc5f9c00fd27b Mon Sep 17 00:00:00 2001
From: Celine Souchet <celine.souchet@bonitasoft.com>
Date: Wed, 1 Sep 2021 16:57:41 +0200
Subject: [PATCH 5/6] Add Submitting to CRAN part in the maintainer doc

---
 CONTRIBUTING.md               |   9 ++++++++-
 doc/cran-submitting.png       | Bin 0 -> 63589 bytes
 doc/r-studio-binary-build.png | Bin 0 -> 63559 bytes
 3 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 doc/cran-submitting.png
 create mode 100644 doc/r-studio-binary-build.png

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1b8f13a..b88ad8a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -149,7 +149,14 @@ Create a new PR and merge it, if the version in the [DESCRIPTION](./DESCRIPTION)
 
 - Pull the new version created by the release workflow: `git pull origin`
 - Ensure you are on the last tag locally: `git checkout vX.Y.Z`
-- :warning: TODO: Explain the procedure to publish on CRAN
+- Open the project in the R Studio
+- On the **Build** tab, click on **More** > **Build Binary Package**
+<p align="center"><img title="Build Binary Package" src="./doc/r-studio-binary-build.png" alt="Build Binary Package"></p>
+
+- Go to the folder where the project is checkout. You should find a file named like `bpmnVisualization_X.Y.Z.tgz`.
+- Fill all the fields of this [web form](https://xmpalantir.wu.ac.at/cransubmit/), and load `bpmnVisualization_X.Y.Z.tgz` file.
+- Submit
+<p align="center"><img title="Submitting to CRAN" src="./doc/cran-submitting.png" alt="Submitting to CRAN"></p>
 
 ### Communicate about the release
 
diff --git a/doc/cran-submitting.png b/doc/cran-submitting.png
new file mode 100644
index 0000000000000000000000000000000000000000..c4308875d747e98691d26911041588bef21d2807
GIT binary patch
diff --git a/doc/r-studio-binary-build.png b/doc/r-studio-binary-build.png
new file mode 100644
index 0000000000000000000000000000000000000000..de4540153a63e6cbd601d5eaa8e5665aefa77e67
GIT binary patch

From fee6e05456b8ad103aa8ed2ad5a1fe0049bf1569 Mon Sep 17 00:00:00 2001
From: Celine Souchet <celine.souchet@bonitasoft.com>
Date: Wed, 1 Sep 2021 16:59:52 +0200
Subject: [PATCH 6/6] Update Submitting to CRAN part in the maintainer doc

---
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b88ad8a..9be73b7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -153,7 +153,7 @@ Create a new PR and merge it, if the version in the [DESCRIPTION](./DESCRIPTION)
 - On the **Build** tab, click on **More** > **Build Binary Package**
 <p align="center"><img title="Build Binary Package" src="./doc/r-studio-binary-build.png" alt="Build Binary Package"></p>
 
-- Go to the folder where the project is checkout. You should find a file named like `bpmnVisualization_X.Y.Z.tgz`.
+- Go to the parent folder of the project. You should find a file named like `bpmnVisualization_X.Y.Z.tgz`.
 - Fill all the fields of this [web form](https://xmpalantir.wu.ac.at/cransubmit/), and load `bpmnVisualization_X.Y.Z.tgz` file.
 - Submit
 <p align="center"><img title="Submitting to CRAN" src="./doc/cran-submitting.png" alt="Submitting to CRAN"></p>
