Skip to content

Commit

Permalink
📝 RELEASE_PROCESS
Browse files Browse the repository at this point in the history
  • Loading branch information
WaKeMaTTa committed Dec 17, 2021
1 parent 52d2d93 commit 48ea01a
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

# [0.1.1] - 2021-12-17

Created `RELEASE_PROCESS.md`.

## [0.1.0] - 2021-09-17

- Initial release:
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ gem "pry"
gem "faker"
gem "rspec", "~> 3.0"
gem "webmock"

# Publish Gem
gem "gem-release", "~> 2.2"
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.4.1)
activesupport (7.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
Expand Down Expand Up @@ -53,24 +52,25 @@ GEM
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday_middleware (1.1.0)
faraday_middleware (1.2.0)
faraday (~> 1.0)
gem-release (2.2.2)
hashdiff (1.0.1)
i18n (1.8.10)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
method_source (1.0.0)
minitest (5.14.4)
minitest (5.15.0)
multipart-post (2.1.1)
parallel (1.21.0)
parser (3.0.2.0)
parser (3.0.3.2)
ast (~> 2.4.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
rainbow (3.0.0)
rake (13.0.6)
regexp_parser (2.1.1)
regexp_parser (2.2.0)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
Expand All @@ -84,17 +84,17 @@ GEM
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (1.21.0)
rspec-support (3.10.3)
rubocop (1.23.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.9.1, < 2.0)
rubocop-ast (>= 1.12.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.12.0)
rubocop-ast (1.15.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
Expand All @@ -105,14 +105,14 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.4.2)

PLATFORMS
x86_64-linux

DEPENDENCIES
dotenv
faker
gem-release (~> 2.2)
pry
rake (~> 13.0)
rspec (~> 3.0)
Expand Down
51 changes: 51 additions & 0 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# How to create a new release

## Step 1: Update `CHANGELOG.md`

The step 1 is to make sure the `CHANGELOG.md` is up-to-date. If is not up-to-date
please update the missing changes.

## Step 2: Prepare the release

Note: This steps needs to be performed in the `main` branch. Remember to have a up-to-date repo.

First open the `lib/zoho_sign/version.rb` file and update the `VERSION` constant.

We are following "[Semantic Versioning v2](https://semver.org/spec/v2.0.0.html)" conventions.

## Step 3: Setup your environment

First of all make sure you have the file `~/.gem/credentials` with this content:

```yml
---
:rubygems_api_key: $RUBYGEM_API_KEY
:github: $GITHUB_TOKEN_API_KEY
```
You can get your `$RUBYGEM_API_KEY` from your RubyGems.org account.
You can get your `$GITHUB_TOKEN_API_KEY` from your GitHub.com account. Instructions [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

## Step 4: Publish new gem version in GitHub Package Registry

Now last step run this terminal commands:

```bash
gem build *.gemspec
gem push --KEY github --host https://$GITHUB_USER:[email protected]/wecasa *.gem
```

- `$GITHUB_USER` -> example `wakematta`
- `$GITHUB_TOKEN_API_KEY` -> Instructions [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

## Step 5: Publish new gem version in RubyGems.org

Now you can run this terminal command:

```bash
gem bump --release --push --tag --version '$NEW_RELEASE_VERSION' --message ':arrow_up: Prepare release v%{version} %{skip_ci}'
```

Remember that `$NEW_RELEASE_VERSION` needs to be the same as the one in `lib/zoho_sign/version.rb`.

You can add `--pretend` to the command, to make sure there is no erros. Before doing it for real.
2 changes: 1 addition & 1 deletion lib/zoho_sign/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ZohoSign
VERSION = "0.1.0"
VERSION = "0.1.1"
end

0 comments on commit 48ea01a

Please sign in to comment.