<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/templates/newgem/github/workflows/main.yml.tt, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/rubygems] Add `--ext=go` to `bundle gem`</title>
<updated>2025-11-19T00:47:07+00:00</updated>
<author>
<name>Go Sueyoshi</name>
<email>sue445@users.noreply.github.com</email>
</author>
<published>2025-11-19T00:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4423facbffd5bd523541ebf42dc274272b1de732'/>
<id>4423facbffd5bd523541ebf42dc274272b1de732</id>
<content type='text'>
(https://github.com/ruby/rubygems/pull/8183)

* Add new gem templates

* Add `--ext=go` in `bundle gem`

* Add setup-go to .github/workflows/main.yml

* Embed go version in go.mod

* Use go in bundler CI

* Add example method to template

* Install Go in .circleci/config.yml

* Install Go in .gitlab-ci.yml

* Allow hard tabs in go template

* Run `rake update_manifest`

* Fix test

* Move go_gem to gemspec

Respect to 9b0ec80

* nits: :golf:

* includes valid module name in go.mod

* generate header file

* Run `go mod tidy` to create `go.sum`

* Check if `go.sum` is generated only when Go is installed

To avoid test failure in environments where Go is not installed

* Run CI

* Workaround for hung up

c.f. https://github.com/rubygems/rubygems/actions/runs/11639408044/job/32415545422

* Write man for --ext=go

* Re-generate man with `./bin/rake man:build`

* pinning :pushpin:

* Update with `./bin/rake man:build`

* nits: Extract to method

* nits: Use `sys_exec` instead of `system`

* Clean go module cache after test

Workaround following error

```
1) bundle gem gem naming with underscore --ext parameter set with go includes go_gem extension in extconf.rb
   Failure/Error: FileUtils.rm_r(dir)

   Errno::EACCES:
     Permission denied @ apply2files - /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
   # ./spec/support/helpers.rb:37:in `block in reset!'
   # ./spec/support/helpers.rb:21:in `each'
   # ./spec/support/helpers.rb:21:in `reset!'
   # ./spec/spec_helper.rb:130:in `block (2 levels) in &lt;top (required)&gt;'
   # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `load'
   # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `activate_and_load_bin_path'
```

Files installed with `go get` have permissions set to 444
ref. https://github.com/golang/go/issues/35615

```
$ ls -l /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
-r--r--r-- 1 runner runner 42320 Nov 15 06:38 /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
```

So they cannot be deleted by `FileUtils.rm_r`.
Therefore, this is necessary to execute `go clean -modcache` separately from `FileUtils.rm_r` to circumvent it.

* Remove needless changes

ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532902051

* ci: setup-go is needless

* Don't run go command in `bundle gem`

ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532765470

* Revert unrelated date changes

---------

https://github.com/ruby/rubygems/commit/260d7d60b3

Co-authored-by: Hiroshi SHIBATA &lt;hsbt@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/rubygems/pull/8183)

* Add new gem templates

* Add `--ext=go` in `bundle gem`

* Add setup-go to .github/workflows/main.yml

* Embed go version in go.mod

* Use go in bundler CI

* Add example method to template

* Install Go in .circleci/config.yml

* Install Go in .gitlab-ci.yml

* Allow hard tabs in go template

* Run `rake update_manifest`

* Fix test

* Move go_gem to gemspec

Respect to 9b0ec80

* nits: :golf:

* includes valid module name in go.mod

* generate header file

* Run `go mod tidy` to create `go.sum`

* Check if `go.sum` is generated only when Go is installed

To avoid test failure in environments where Go is not installed

* Run CI

* Workaround for hung up

c.f. https://github.com/rubygems/rubygems/actions/runs/11639408044/job/32415545422

* Write man for --ext=go

* Re-generate man with `./bin/rake man:build`

* pinning :pushpin:

* Update with `./bin/rake man:build`

* nits: Extract to method

* nits: Use `sys_exec` instead of `system`

* Clean go module cache after test

Workaround following error

```
1) bundle gem gem naming with underscore --ext parameter set with go includes go_gem extension in extconf.rb
   Failure/Error: FileUtils.rm_r(dir)

   Errno::EACCES:
     Permission denied @ apply2files - /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
   # ./spec/support/helpers.rb:37:in `block in reset!'
   # ./spec/support/helpers.rb:21:in `each'
   # ./spec/support/helpers.rb:21:in `reset!'
   # ./spec/spec_helper.rb:130:in `block (2 levels) in &lt;top (required)&gt;'
   # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `load'
   # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `activate_and_load_bin_path'
```

Files installed with `go get` have permissions set to 444
ref. https://github.com/golang/go/issues/35615

```
$ ls -l /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
-r--r--r-- 1 runner runner 42320 Nov 15 06:38 /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go
```

So they cannot be deleted by `FileUtils.rm_r`.
Therefore, this is necessary to execute `go clean -modcache` separately from `FileUtils.rm_r` to circumvent it.

* Remove needless changes

ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532902051

* ci: setup-go is needless

* Don't run go command in `bundle gem`

ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532765470

* Revert unrelated date changes

---------

https://github.com/ruby/rubygems/commit/260d7d60b3

Co-authored-by: Hiroshi SHIBATA &lt;hsbt@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use `persist-credentials: false` in template</title>
<updated>2025-06-19T01:23:36+00:00</updated>
<author>
<name>Landon Grindheim</name>
<email>landon.grindheim@gmail.com</email>
</author>
<published>2025-06-18T19:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=471da0f0bd8adcff4a32d51fcf5fe8828f05d6b0'/>
<id>471da0f0bd8adcff4a32d51fcf5fe8828f05d6b0</id>
<content type='text'>
`actions/checkout` defaults this value to `true`, causing credentials to
be written to `.git/config`. By setting it to `false`, we lessen the
likelihood of secrets being written to disk.

https://github.com/rubygems/rubygems/commit/a751d36456
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`actions/checkout` defaults this value to `true`, causing credentials to
be written to `.git/config`. By setting it to `false`, we lessen the
likelihood of secrets being written to disk.

https://github.com/rubygems/rubygems/commit/a751d36456
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Indent github workflow steps for generated gems</title>
<updated>2024-10-30T14:06:58+00:00</updated>
<author>
<name>Jerome Dalbert</name>
<email>jerome.dalbert@gmail.com</email>
</author>
<published>2024-10-29T06:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=caa6bcc91f1c3070d704474d791d264993b55194'/>
<id>caa6bcc91f1c3070d704474d791d264993b55194</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/a1784e2efa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/a1784e2efa
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Bump actions/checkout to v4 in bundler gem template</title>
<updated>2023-09-19T01:06:35+00:00</updated>
<author>
<name>Yoshiki Takagi</name>
<email>yoshiki.tkg@gmail.com</email>
</author>
<published>2023-09-16T07:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=465c222ef125a93b1cd457d18e70a7d58454f628'/>
<id>465c222ef125a93b1cd457d18e70a7d58454f628</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/5ed4c600da
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/5ed4c600da
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use `RbSys::ExtensionTask` when creating new rust gems</title>
<updated>2023-03-10T11:50:06+00:00</updated>
<author>
<name>Ian Ker-Seymer</name>
<email>hello@ianks.com</email>
</author>
<published>2023-02-06T19:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dd47ce10dbfca9292e88bbbd3d7f37e3ea503034'/>
<id>dd47ce10dbfca9292e88bbbd3d7f37e3ea503034</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/125f9fece9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/125f9fece9
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RubyGems-3.4.0 and Bundler-2.4.0</title>
<updated>2022-12-24T07:57:07+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-21T23:20:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f6620037ba1477d2c337d7b511f094d6d0fbb69c'/>
<id>f6620037ba1477d2c337d7b511f094d6d0fbb69c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] bump actions/checkout to 3 in bundler gem template</title>
<updated>2022-04-04T05:14:40+00:00</updated>
<author>
<name>Hartley McGuire</name>
<email>skipkayhil@gmail.com</email>
</author>
<published>2022-04-04T01:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4db75b6fe7453624bcb2286c4b191b49fc657f2e'/>
<id>4db75b6fe7453624bcb2286c4b191b49fc657f2e</id>
<content type='text'>
Dependabot bumped the repo's configuration in 0c996fa but it did not
bump the version in the template for `bundler gem`

https://github.com/rubygems/rubygems/commit/e14980e169
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dependabot bumped the repo's configuration in 0c996fa but it did not
bump the version in the template for `bundler gem`

https://github.com/rubygems/rubygems/commit/e14980e169
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Update bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt</title>
<updated>2021-11-30T22:15:18+00:00</updated>
<author>
<name>Olle Jonsson</name>
<email>olle.jonsson@gmail.com</email>
</author>
<published>2021-11-30T20:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b68217fff9caba33d1f3e14de3673b6abd624dc2'/>
<id>b68217fff9caba33d1f3e14de3673b6abd624dc2</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/8836fe157b

Co-authored-by: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/8836fe157b

Co-authored-by: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Update main.yml.tt</title>
<updated>2021-11-30T22:15:18+00:00</updated>
<author>
<name>Olle Jonsson</name>
<email>olle.jonsson@gmail.com</email>
</author>
<published>2021-11-24T16:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=46a24f7e7744b483f1de88b0c26a8d22161a2242'/>
<id>46a24f7e7744b483f1de88b0c26a8d22161a2242</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/3260173c59
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/3260173c59
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] newgem tmpl: ruby as "2.7" in GH Actions matrix</title>
<updated>2021-11-30T22:15:17+00:00</updated>
<author>
<name>Olle Jonsson</name>
<email>olle.jonsson@gmail.com</email>
</author>
<published>2021-11-24T16:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7fd639423dba631900d1d4f395d805cf0d97d5e'/>
<id>a7fd639423dba631900d1d4f395d805cf0d97d5e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/f5bead5634
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/f5bead5634
</pre>
</div>
</content>
</entry>
</feed>
