Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create publish-gem.yml #898

Merged
merged 26 commits into from
Jan 9, 2024
Merged

Create publish-gem.yml #898

merged 26 commits into from
Jan 9, 2024

Conversation

tsusdere
Copy link
Contributor

@tsusdere tsusdere commented Jan 2, 2024

Adds workflow to automate publishing the gem to RubyGems

@tsusdere tsusdere marked this pull request as ready for review January 2, 2024 19:26
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ruby-version: '3.2'
ruby-version: '2.7.3'

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.3'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason not to release on a later version? At least worthwhile to use 2.7.8 to get the bug and security fixes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @parkr do you think if we can move to ruby 3.0 for this project? yeh we can move to 2.7.8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add seems the same problem with CI can be seen with other repos (regarding Ruby version):
https://github.com/pages-themes/midnight/actions/runs/7391072383/job/20107215490?pr=50

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should go to 3.2 at least, but there might be bugs to fix along the way.

- name: Build gem
run: |
gem build github-pages.gemspec
- name: Publish
Copy link
Contributor

@YiMysty YiMysty Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should only run when merge into master branch or tag release I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to instead run the job when we merge into master branch?

on:
  push:
    branches:
      - main

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on:
  release:
    types: [released]

Dockerfile Outdated
@@ -8,7 +8,8 @@ RUN apt-get update \
make \
nodejs

RUN gem update --system
# final version for rubygems-update to supoprt ruby 2.7, consider removing this after upgraded to ruby 3.0
RUN gem update --system 3.4.22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're upgrading in this PR, you can probably remove this.

- 2.6
- 2.7
- 3.0
- 3.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote these so they become strings when parsed rather than floats.

.travis.yml Outdated
- 2.6
- 2.7
- 3.0
- 3.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this Travis config file entirely.

@parkr
Copy link
Contributor

parkr commented Jan 4, 2024

Ruby 3.3 support is added by #897. That needs to be merged first!

@@ -1,4 +1,4 @@
FROM ruby:2.7.3-alpine
FROM ruby:3.3-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe CI is attempting to pass the RUBY_VERSION build arg, but here it's always ruby 3.3.

Either remove the RUBY_VERSION arg from CI and script/cibuild-docker or support it here in Dockerfile.

@@ -63,7 +63,7 @@ def self.version_report
require "nokogiri"

{
"ruby" => RUBY_VERSION,
"ruby" => "3.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will show unexpected values for non-Ruby 3.3 CI.

@tsusdere tsusdere merged commit 974872f into master Jan 9, 2024
3 checks passed
@tsusdere tsusdere deleted the publishing-workflow branch January 9, 2024 22:20
another-rex referenced this pull request in google/osv-scanner Feb 14, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github-pages](https://togithub.com/github/pages-gem) | `"~> 228"` ->
`"~> 230"` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/github-pages/230?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/github-pages/230?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/github-pages/228/230?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/github-pages/228/230?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>github/pages-gem (github-pages)</summary>

### [`v230`](https://togithub.com/github/pages-gem/releases/tag/v230)

[Compare
Source](https://togithub.com/github/pages-gem/compare/v229...v230)

#### What's Changed

- Bump docker/login-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/907](https://togithub.com/github/pages-gem/pull/907)
- Bump docker/build-push-action from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/905](https://togithub.com/github/pages-gem/pull/905)
- Bump docker/setup-buildx-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/906](https://togithub.com/github/pages-gem/pull/906)
- Bump Jekyll to 3.9.5 by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/908](https://togithub.com/github/pages-gem/pull/908)

**Full Changelog**:
github/pages-gem@v229...v230

### [`v229`](https://togithub.com/github/pages-gem/releases/tag/v229)

[Compare
Source](https://togithub.com/github/pages-gem/compare/v228...v229)

#### What's Changed

- Bump docker/metadata-action from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/889](https://togithub.com/github/pages-gem/pull/889)
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/888](https://togithub.com/github/pages-gem/pull/888)
- Fixes `$github-pages health-check` NoMethodError by
[@&#8203;edward](https://togithub.com/edward) in
[https://github.com/github/pages-gem/pull/878](https://togithub.com/github/pages-gem/pull/878)
- Support Ruby 3.2+, fixes
[#&#8203;879](https://togithub.com/github/pages-gem/issues/879) by
[@&#8203;fulldecent](https://togithub.com/fulldecent) in
[https://github.com/github/pages-gem/pull/880](https://togithub.com/github/pages-gem/pull/880)
- Create publish-gem.yml by
[@&#8203;tsusdere](https://togithub.com/tsusdere) in
[https://github.com/github/pages-gem/pull/898](https://togithub.com/github/pages-gem/pull/898)
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/900](https://togithub.com/github/pages-gem/pull/900)
- Enable multi arch docker image build by
[@&#8203;rngtng](https://togithub.com/rngtng) in
[https://github.com/github/pages-gem/pull/884](https://togithub.com/github/pages-gem/pull/884)
- Bring back proper support for Ruby 3.x by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/901](https://togithub.com/github/pages-gem/pull/901)
- Bump dependencies (patch and minor only) by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/902](https://togithub.com/github/pages-gem/pull/902)
- Fix release script by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/903](https://togithub.com/github/pages-gem/pull/903)
- Another publish script fix by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/904](https://togithub.com/github/pages-gem/pull/904)

#### New Contributors

- [@&#8203;edward](https://togithub.com/edward) made their first
contribution in
[https://github.com/github/pages-gem/pull/878](https://togithub.com/github/pages-gem/pull/878)
- [@&#8203;fulldecent](https://togithub.com/fulldecent) made their first
contribution in
[https://github.com/github/pages-gem/pull/880](https://togithub.com/github/pages-gem/pull/880)
- [@&#8203;tsusdere](https://togithub.com/tsusdere) made their first
contribution in
[https://github.com/github/pages-gem/pull/898](https://togithub.com/github/pages-gem/pull/898)
- [@&#8203;rngtng](https://togithub.com/rngtng) made their first
contribution in
[https://github.com/github/pages-gem/pull/884](https://togithub.com/github/pages-gem/pull/884)

**Full Changelog**:
github/pages-gem@v228...v229

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv-scanner).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
werdnanoslen referenced this pull request in trussworks/research-design-playbook Feb 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github-pages](https://togithub.com/github/pages-gem) | `"~> 228"` ->
`"~> 231"` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/github-pages/231?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/github-pages/231?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/github-pages/228/231?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/github-pages/228/231?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>github/pages-gem (github-pages)</summary>

### [`v231`](https://togithub.com/github/pages-gem/releases/tag/v231)

[Compare
Source](https://togithub.com/github/pages-gem/compare/v230...v231)

#### What's Changed

- Revert jekyll-relative-links to 0.6.1 and add a test by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/910](https://togithub.com/github/pages-gem/pull/910)

**Full Changelog**:
github/pages-gem@v230...v231

### [`v230`](https://togithub.com/github/pages-gem/releases/tag/v230)

[Compare
Source](https://togithub.com/github/pages-gem/compare/v229...v230)

#### What's Changed

- Bump docker/login-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/907](https://togithub.com/github/pages-gem/pull/907)
- Bump docker/build-push-action from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/905](https://togithub.com/github/pages-gem/pull/905)
- Bump docker/setup-buildx-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/906](https://togithub.com/github/pages-gem/pull/906)
- Bump Jekyll to 3.9.5 by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/908](https://togithub.com/github/pages-gem/pull/908)

**Full Changelog**:
github/pages-gem@v229...v230

### [`v229`](https://togithub.com/github/pages-gem/releases/tag/v229)

[Compare
Source](https://togithub.com/github/pages-gem/compare/v228...v229)

#### What's Changed

- Bump docker/metadata-action from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/889](https://togithub.com/github/pages-gem/pull/889)
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/888](https://togithub.com/github/pages-gem/pull/888)
- Fixes `$github-pages health-check` NoMethodError by
[@&#8203;edward](https://togithub.com/edward) in
[https://github.com/github/pages-gem/pull/878](https://togithub.com/github/pages-gem/pull/878)
- Support Ruby 3.2+, fixes
[#&#8203;879](https://togithub.com/github/pages-gem/issues/879) by
[@&#8203;fulldecent](https://togithub.com/fulldecent) in
[https://github.com/github/pages-gem/pull/880](https://togithub.com/github/pages-gem/pull/880)
- Create publish-gem.yml by
[@&#8203;tsusdere](https://togithub.com/tsusdere) in
[https://github.com/github/pages-gem/pull/898](https://togithub.com/github/pages-gem/pull/898)
- Bump actions/checkout from 3 to 4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/github/pages-gem/pull/900](https://togithub.com/github/pages-gem/pull/900)
- Enable multi arch docker image build by
[@&#8203;rngtng](https://togithub.com/rngtng) in
[https://github.com/github/pages-gem/pull/884](https://togithub.com/github/pages-gem/pull/884)
- Bring back proper support for Ruby 3.x by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/901](https://togithub.com/github/pages-gem/pull/901)
- Bump dependencies (patch and minor only) by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/902](https://togithub.com/github/pages-gem/pull/902)
- Fix release script by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/903](https://togithub.com/github/pages-gem/pull/903)
- Another publish script fix by
[@&#8203;yoannchaudet](https://togithub.com/yoannchaudet) in
[https://github.com/github/pages-gem/pull/904](https://togithub.com/github/pages-gem/pull/904)

#### New Contributors

- [@&#8203;edward](https://togithub.com/edward) made their first
contribution in
[https://github.com/github/pages-gem/pull/878](https://togithub.com/github/pages-gem/pull/878)
- [@&#8203;fulldecent](https://togithub.com/fulldecent) made their first
contribution in
[https://github.com/github/pages-gem/pull/880](https://togithub.com/github/pages-gem/pull/880)
- [@&#8203;tsusdere](https://togithub.com/tsusdere) made their first
contribution in
[https://github.com/github/pages-gem/pull/898](https://togithub.com/github/pages-gem/pull/898)
- [@&#8203;rngtng](https://togithub.com/rngtng) made their first
contribution in
[https://github.com/github/pages-gem/pull/884](https://togithub.com/github/pages-gem/pull/884)

**Full Changelog**:
github/pages-gem@v228...v229

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/trussworks/research-design-playbook).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants