Skip to content

Commit dbd3d85

Browse files
committed
Add instructions for how new versions are published and how to update the version number
1 parent ea1a6e6 commit dbd3d85

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

ReadMe.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ Things to still do:
110110

111111
- Allow using a custom PowerShell Gallery feed URL.
112112
- Create new deployment on tag creation maybe.
113-
- Add instructions for how to assign version number in the contributing docs depending on if they are using actions or pipelines
114113
- Prompt user for module name, org name, pipelines or actions, PowerShell gallery or custom feed with an option to leave it blank to fill it in later.
115114
- Make azure DevOps and GitHub steps in the ReadMe collapsible.
116115
Have screenshots and link to recording of the setup in both, since they involve clicking around in the UI.

docs/Contributing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
Feel free to open an issue or pull request.
44

5+
## 🚀 Publishing new versions
6+
7+
This project acts as a template repository in GitHub, meaning that as soon as a change is pushed to the `main` branch, it will be used when new GitHub repositories are created from this template.
8+
9+
This project also creates a PowerShell module that can be used to create new repositories.
10+
A prerelease version of the module is published to the PowerShell Gallery automatically on every commit to the `main` branch.
11+
The [GitHub Actions `deploy` workflow run](https://github.com/deadlydog/PowerShell.ScriptModuleRepositoryTemplate/actions/workflows/build-test-and-deploy-powershell-module.yml) must be manually approved to publish a stable version.
12+
13+
### Incrementing the version number
14+
15+
The version number is of the format Major.Minor.Patch and follows [semantic versioning](https://semver.org).
16+
By default, every commit to the `main` branch will increment the Patch version number.
17+
18+
If you want to increment the Major or Minor version number, you have 2 options:
19+
20+
1. Manually start a [`deploy` workflow](https://github.com/deadlydog/PowerShell.ScriptModuleRepositoryTemplate/actions/workflows/build-test-and-deploy-powershell-module.yml) run and specify the version number to use.
21+
e.g. Specifying `2.4.0` will produce a new version of `2.4.0`.
22+
1. Create a new version tag and pushing it up to GitHub.
23+
Builds are not triggered on tags, and thus the version tag will be used as the starting point for the next version.
24+
e.g. Creating a new tag of `v2.4.0` will produce a new version of `2.4.1` on the next commit to the `main` branch.
25+
526
## ⁉ Why was a specific decision made
627

728
Curious about some of the choices made in this project?
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# Contributing to this project
22

33
Feel free to open an issue or pull request.
4+
5+
## 🚀 Publishing new versions
6+
7+
A prerelease version of the module is published automatically on every commit to the `main` branch.
8+
The [GitHub Actions `deploy` workflow](/.github/workflows/build-test-and-deploy-powershell-module.yml) run must be manually approved to publish a stable version.
9+
10+
### Incrementing the version number
11+
12+
The version number is of the format Major.Minor.Patch and follows [semantic versioning](https://semver.org).
13+
By default, every commit to the `main` branch will increment the Patch version number.
14+
15+
If you want to increment the Major or Minor version number, you have 2 options:
16+
17+
1. Manually start a [`deploy` workflow](/.github/workflows/build-test-and-deploy-powershell-module.yml) run and specify the version number to use.
18+
e.g. Specifying `2.4.0` will produce a new version of `2.4.0`.
19+
1. Create a new version tag and pushing it up to GitHub.
20+
Builds are not triggered on tags, and thus the version tag will be used as the starting point for the next version.
21+
e.g. Creating a new tag of `v2.4.0` will produce a new version of `2.4.1` on the next commit to the `main` branch.

0 commit comments

Comments
 (0)