You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
summary: Steps to do to enable publication of a new gem
6
+
---
7
+
8
+
Those are the steps you have to take to publish a new gem:
9
+
10
+
11
+
## Setup GitHub workflow
12
+
13
+
Right now we don't have a way to sync workflows for each gem.
14
+
Copy the [release workflow](https://github.com/voxpupuli/gem-workflow-test/blob/master/.github/workflows/release.yml) from our [boilerplate gem](https://github.com/voxpupuli/gem-workflow-test).
15
+
This workflow will take care of:
16
+
17
+
* Building the gem
18
+
* Creating a GitHub and rubygems.org release
19
+
* Attaching the gem to the GitHub release
20
+
* Creating the changelog for the GitHub release
21
+
* Waits until the new version is present on the rubygems.org cache
22
+
23
+
### Configure rubygems.org
24
+
25
+
**This needs to be done by a PMC member**
26
+
27
+
Before the first release, trusted publishing needs to be configured on rubygems.org
28
+
29
+
* login to rubygems.org with the voxpupui or openvoxproject account from gopass
30
+
* go to https://rubygems.org/profile/oidc/pending_trusted_publishers
31
+
* click "create"
32
+
* add gem name, repo owner ("voxpupuli" or "OpenVoxProject"), repo name (usually same as gem name), workflow name (`release.yml`)
33
+
* Set environment to `release` ([configured in our workflow](https://github.com/voxpupuli/gem-workflow-test/blob/96a29ada7ddea2ba0f27cbe0efd2194c7b9e7213/.github/workflows/release.yml#L71))
34
+
35
+
This step has to be done at maximum 48h before the first release, or rubygems.org deletes the configuration
36
+
The configuratin can be added again if rubygems.org deleted it.
37
+
38
+
## Setup the GitHub Changelog configuration
39
+
40
+
Copy the [config yaml](https://github.com/voxpupuli/gem-workflow-test/blob/master/.github/release.yml).
41
+
This will ensure that all closed issues and PRs with labels are sorted into the correct categories.
42
+
43
+
## Recommendations
44
+
45
+
### dependabot
46
+
47
+
We have a basic [dependabot config](https://github.com/voxpupuli/gem-workflow-test/blob/master/.github/dependabot.yml).
48
+
It will raise PRs for updates on Ruby dependencies or github action dependencies.
49
+
We highly recommend that you copy the file.
50
+
51
+
### Gemfile
52
+
53
+
We recommend that the Gemfile contains a `release` gem group:
Copy file name to clipboardExpand all lines: _docs/releasing_gem.md
+18-22Lines changed: 18 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,17 @@ date: 2023-02-25
5
5
summary: How to perform a complete version release
6
6
---
7
7
8
-
The release process is split into two parts. Part one can be done by anybody
9
-
with a GitHub account. You do not need to be part of the Vox Pupuli GitHub
10
-
organisation.
8
+
The release process is split into two parts.
9
+
Part one can be done by anybody with a GitHub account.
10
+
You do not need to be part of the Vox Pupuli GitHub organisation.
11
11
12
12
## Part 1: Create a 'release pr'
13
13
14
-
This pull request updates the changelog and bumps the version number to the
15
-
target version. The version is set in the gemspec file in the root of the git
16
-
repository. Sometimes it's a variable coming from something like
17
-
`lib/$gem/version.rb`. An example is [beaker](https://github.com/voxpupuli/beaker/blob/f60ac9413f9c7976a6645ef9e1dd2afbcc6542de/beaker.gemspec#L8),
18
-
([version.rb](https://github.com/voxpupuli/beaker/blob/master/lib/beaker/version.rb#L3)). This can be done from a fork.
14
+
This pull request updates the changelog and bumps the version number to the target version.
15
+
The version is set in the gemspec file in the root of the git repository.
16
+
Sometimes it's a variable coming from something like`lib/$gem/version.rb`.
17
+
An example is [beaker](https://github.com/voxpupuli/beaker/blob/f60ac9413f9c7976a6645ef9e1dd2afbcc6542de/beaker.gemspec#L8), ([version.rb](https://github.com/voxpupuli/beaker/blob/master/lib/beaker/version.rb#L3)).
18
+
This can be done from a fork.
19
19
20
20
Now you can install the changelog generator:
21
21
@@ -31,25 +31,24 @@ And in case you installed the gems before:
31
31
bundle install; bundle update; bundle clean
32
32
```
33
33
34
-
We can generate the changelog (in most cases, this requires a
35
-
[GitHub access token (docs on how to create one)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line):
36
-
the changelog generator expects the token in the environment variable `CHANGELOG_GITHUB_TOKEN`).
34
+
We can generate the changelog (in most cases, this requires a [GitHub access token (docs on how to create one)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line): the changelog generator expects the token in the environment variable `CHANGELOG_GITHUB_TOKEN`).
0 commit comments