Skip to content

Commit 9673116

Browse files
authored
Merge pull request #67 from bastelfreak/rc
voxpupuli-rubocop: Update 3.0.0->3.1.0
2 parents 522d955 + 1607384 commit 9673116

File tree

6 files changed

+137
-21
lines changed

6 files changed

+137
-21
lines changed

.github/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
3+
4+
changelog:
5+
exclude:
6+
labels:
7+
- duplicate
8+
- invalid
9+
- modulesync
10+
- question
11+
- skip-changelog
12+
- wont-fix
13+
- wontfix
14+
- github_actions
15+
16+
categories:
17+
- title: Breaking Changes 🛠
18+
labels:
19+
- backwards-incompatible
20+
21+
- title: New Features 🎉
22+
labels:
23+
- enhancement
24+
25+
- title: Bug Fixes 🐛
26+
labels:
27+
- bug
28+
- bugfix
29+
30+
- title: Documentation Updates 📚
31+
labels:
32+
- documentation
33+
- docs
34+
35+
- title: Dependency Updates ⬆️
36+
labels:
37+
- dependencies
38+
39+
- title: Other Changes
40+
labels:
41+
- "*"

.github/workflows/release.yml

Lines changed: 90 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,106 @@
1-
name: Release
1+
---
2+
name: Gem Release
23

34
on:
45
push:
56
tags:
67
- '*'
78

9+
permissions: {}
10+
811
jobs:
9-
release:
10-
runs-on: ubuntu-latest
12+
build-release:
13+
# Prevent releases from forked repositories
1114
if: github.repository_owner == 'voxpupuli'
15+
name: Build the gem
16+
runs-on: ubuntu-24.04
1217
steps:
1318
- uses: actions/checkout@v4
14-
- name: Install Ruby 3.4
19+
- name: Install Ruby
1520
uses: ruby/setup-ruby@v1
1621
with:
17-
ruby-version: '3.4'
18-
bundler: 'none'
22+
ruby-version: 'ruby'
1923
- name: Build gem
20-
run: gem build --strict --verbose *.gemspec
24+
shell: bash
25+
run: gem build --verbose *.gemspec
26+
- name: Upload gem to GitHub cache
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: gem-artifact
30+
path: '*.gem'
31+
retention-days: 1
32+
compression-level: 0
33+
34+
create-github-release:
35+
needs: build-release
36+
name: Create GitHub release
37+
runs-on: ubuntu-24.04
38+
permissions:
39+
contents: write # clone repo and create release
40+
steps:
41+
- name: Download gem from GitHub cache
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: gem-artifact
45+
- name: Create Release
46+
shell: bash
47+
env:
48+
GH_TOKEN: ${{ github.token }}
49+
run: gh release create --repo ${{ github.repository }} ${{ github.ref_name }} --generate-notes *.gem
50+
51+
release-to-github:
52+
needs: build-release
53+
name: Release to GitHub
54+
runs-on: ubuntu-24.04
55+
permissions:
56+
packages: write # publish to rubygems.pkg.github.com
57+
steps:
58+
- name: Download gem from GitHub cache
59+
uses: actions/download-artifact@v4
60+
with:
61+
name: gem-artifact
62+
- name: Publish gem to GitHub packages
63+
run: gem push --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
64+
env:
65+
GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }}
66+
67+
release-to-rubygems:
68+
needs: build-release
69+
name: Release gem to rubygems.org
70+
runs-on: ubuntu-24.04
71+
environment: release # recommended by rubygems.org
72+
permissions:
73+
id-token: write # rubygems.org authentication
74+
steps:
75+
- name: Download gem from GitHub cache
76+
uses: actions/download-artifact@v4
77+
with:
78+
name: gem-artifact
79+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
2180
- name: Publish gem to rubygems.org
81+
shell: bash
2282
run: gem push *.gem
23-
env:
24-
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
25-
- name: Setup GitHub packages access
83+
84+
release-verification:
85+
name: Check that all releases are done
86+
runs-on: ubuntu-24.04
87+
permissions:
88+
contents: read # minimal permissions that we have to grant
89+
needs:
90+
- create-github-release
91+
- release-to-github
92+
- release-to-rubygems
93+
steps:
94+
- name: Download gem from GitHub cache
95+
uses: actions/download-artifact@v4
96+
with:
97+
name: gem-artifact
98+
- name: Install Ruby
99+
uses: ruby/setup-ruby@v1
100+
with:
101+
ruby-version: 'ruby'
102+
- name: Wait for release to propagate
103+
shell: bash
26104
run: |
27-
mkdir -p ~/.gem
28-
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
29-
chmod 0600 ~/.gem/credentials
30-
- name: Publish gem to GitHub packages
31-
run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
105+
gem install rubygems-await
106+
gem await *.gem

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: CI
23

34
on:
@@ -8,7 +9,6 @@ on:
89

910
env:
1011
BEAKER_HYPERVISOR: docker
11-
BUNDLE_WITHOUT: release
1212

1313
jobs:
1414
rubocop_and_matrix:

.rubocop_todo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
2-
# `rubocop --auto-gen-config`
3-
# on 2024-05-28 10:04:32 UTC using RuboCop version 1.63.5.
2+
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
3+
# using RuboCop version 1.75.8.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ group :development do
1313
end
1414

1515
group :rubocop do
16-
gem 'voxpupuli-rubocop', '~> 3.0.0'
16+
gem 'voxpupuli-rubocop', '~> 3.1.0'
1717
end
1818

1919
group :test do
@@ -27,7 +27,7 @@ when 'vagrant', 'vagrant_libvirt'
2727
gem 'beaker-vagrant'
2828
end
2929

30-
group :release do
30+
group :release, optional: true do
3131
gem 'faraday-retry', require: false
3232
gem 'github_changelog_generator', require: false
3333
end

beaker_puppet_helpers.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
1919
s.add_dependency 'beaker', '>= 5.8.1', '< 7'
2020
s.add_dependency 'puppet-modulebuilder', '>= 0.3', '< 3'
2121
# we need to declare both dependencies explicitly on Ruby 3.4+
22-
s.add_dependency 'base64', '~> 0.2.0'
22+
s.add_dependency 'base64', '>= 0.2', '< 1'
2323
s.add_dependency 'benchmark', '~> 0.4.0'
2424
end

0 commit comments

Comments
 (0)