Skip to content

Commit

Permalink
feat: Use New release workflow (#139)
Browse files Browse the repository at this point in the history
* Use New release workflow

Signed-off-by: Dan Webb <[email protected]>

* BREAKING CHANGE: Require Ruby 3.1

---------

Signed-off-by: Dan Webb <[email protected]>
  • Loading branch information
damacus authored Nov 27, 2023
1 parent a32d9fd commit dc35534
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 55 deletions.
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Lint Unit"

"on":
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/[email protected]
9 changes: 0 additions & 9 deletions .github/workflows/linters.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: release-please

"on":
push:
branches: [main]

name: Release
jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -14,19 +15,21 @@ jobs:
release-type: ruby
package-name: kitchen-hyperv
version-file: lib/kitchen/driver/hyperv_version.rb
token: ${{ secrets.PUBLISH_WORKFLOW_TOKEN }}
signoff: "Dan Webb <[email protected]>"
changelog-notes-type: github
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- name: Build and publish to GitHub Package
uses: actionshub/publish-gem-to-github@main
if: ${{ steps.release.outputs.release_created }}
uses: actionshub/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ secrets.OWNER }}

- name: Build and publish to RubyGems
uses: actionshub/publish-gem-to-rubygems@main
if: ${{ steps.release.outputs.release_created }}
uses: actionshub/[email protected]
with:
api_key: ${{ secrets.RUBYGEMS_API_KEY }}
token: ${{ secrets.RUBYGEMS_API_KEY }}
7 changes: 0 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
Layout/LineLength:
Max: 100

Style/Documentation:
Enabled: false

require:
- chefstyle

Expand Down
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ source "https://rubygems.org"

gemspec

group :integration do
group :test do
gem "berkshelf"
gem "kitchen-inspec"
gem "kitchen-dokken"
gem "kitchen-vagrant"
gem "rake"
gem "minitest", "~> 5.3", "< 5.19"
gem "minitest-stub-const"
gem "mocha", "~> 2.0"
end

group :debug do
group :development do
gem "pry"
gem "pry-byebug"
gem "pry-stack_explorer"
Expand All @@ -22,3 +26,4 @@ end
group :docs do
gem "yard"
end

7 changes: 1 addition & 6 deletions kitchen-hyperv.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ Gem::Specification.new do |spec|
spec.files = %w{LICENSE kitchen-hyperv.gemspec Gemfile Rakefile support/hyperv.ps1} + Dir.glob("lib/**/*")
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.6"

spec.add_development_dependency "rake"
spec.add_development_dependency "minitest", "~> 5.3", "< 5.19"
spec.add_development_dependency "minitest-stub-const"
spec.add_development_dependency "mocha", "~> 2.0"
spec.required_ruby_version = ">= 3.1"

spec.add_dependency "test-kitchen", ">= 1.4", "< 4"
spec.add_dependency "train", "~> 3.5"
Expand Down
16 changes: 4 additions & 12 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", ":semanticCommits"],
"packageRules": [
{
"groupName": "All Dependencies",
"matchUpdateTypes": ["minor", "patch", "pin"],
"automerge": true
},
{
"groupName": "All dependencies (major)",
"matchUpdateTypes": ["major"],
"automerge": false
}
"extends": [
"config:recommended",
":disableDependencyDashboard",
"schedule:automergeEarlyMondays"
]
}

0 comments on commit dc35534

Please sign in to comment.