From 5d7ba4fa3d422d8ff4bfa57ba3d6034c787abe7f Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:36:17 +0100 Subject: [PATCH 1/6] fix: Fix rubocop offenses. --- deploy-agent.gemspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy-agent.gemspec b/deploy-agent.gemspec index e0d78b0..7d8be37 100644 --- a/deploy-agent.gemspec +++ b/deploy-agent.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'deploy-agent' - s.version = '1.2.6' + s.version = '1.3.3' s.required_ruby_version = '>= 2.7' s.summary = 'The DeployHQ Agent' s.description = 'This gem allows you to configure a secure proxy through which DeployHQ can forward connections' @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.bindir = 'bin' s.executables << 'deploy-agent' - s.add_runtime_dependency 'nio4r', '2.1.0' - s.add_runtime_dependency 'rb-readline', '0.5.5' - s.add_runtime_dependency 'timers', '4.1.2' + s.add_dependency 'nio4r', '2.1.0' + s.add_dependency 'rb-readline', '0.5.5' + s.add_dependency 'timers', '4.1.2' end From 2b65cf1b14be81a36ecc6ef8a7c2ec1d94186298 Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:37:11 +0100 Subject: [PATCH 2/6] fix: Replace deprecated `File.exists?` method. --- lib/deploy_agent/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/deploy_agent/cli.rb b/lib/deploy_agent/cli.rb index 49e1f75..c55db06 100644 --- a/lib/deploy_agent/cli.rb +++ b/lib/deploy_agent/cli.rb @@ -123,7 +123,7 @@ def pid_from_file def write_pid File.open(PID_PATH, 'w') { |f| f.write Process.pid.to_s } - at_exit { File.delete(PID_PATH) if File.exists?(PID_PATH) } + at_exit { File.delete(PID_PATH) if File.exist?(PID_PATH) } end end From b911f9a2b8d0d2e0dc63ed8088d5bacf73d6eff7 Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:39:07 +0100 Subject: [PATCH 3/6] ci: Use Google's release-please action + Use ruby 3.4.1. --- .github/workflows/ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5a9f0c..bde6bb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: 3.4.1 - name: Install dependencies run: bundle install - name: Run linter @@ -21,22 +21,19 @@ jobs: release_created: ${{ steps.release-please.outputs.release_created }} version: ${{ steps.release-please.outputs.version }} steps: - - uses: krystal/release-please-manifest-action@v1 + - uses: googleapis/release-please-action@v4 id: release-please - with: - app-id: ${{ vars.RELEASE_PLEASE_GITHUB_APP_ID }} - private-key: ${{ secrets.RELEASE_PLEASE_GITHUB_APP_PRIVATE_KEY }} release: runs-on: ubuntu-latest needs: [lint, release-please] - if: needs.release-please.outputs.release_created + if: ${{ needs.release-please.outputs.release_created }} steps: - uses: actions/checkout@v3 - name: Set up Ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: 3.4.1 - name: Export version from tag name run: echo "${{ needs.release-please.outputs.version }}" > VERSION - name: Build Gem @@ -48,7 +45,7 @@ jobs: chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials env: - RUBYGEMS_API_KEY: ${{secrets.KRYSTAL_RUBYGEMS_API_KEY}} + RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} - name: Publish to RubyGems run: | gem push *.gem From 73cfc3b9e7f9c38b4cfd986a60881f05cb22ca74 Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:48:07 +0100 Subject: [PATCH 4/6] docs: Improve README with Release instructions. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b77c6e5..d42b734 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,13 @@ Start agent in background ``` $ deploy-agent start ``` + +## Release + +This project uses [Google's release-please](https://github.com/googleapis/release-please) action which automates CHANGELOG generation, the creation of GitHub releases, and version bumps. + +**Commit messages are important!** + +`release-please` assumes that you are following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. +This means that your commit messages should be structured in a way that release-please can determine the type of change that has been made. +Please refer to the ["How should I write my commits"](https://github.com/googleapis/release-please?tab=readme-ov-file#how-should-i-write-my-commits) documentation. From 5373d31df31928997213e7e883ddd899a6d7d6c3 Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:49:10 +0100 Subject: [PATCH 5/6] fix: Fix release-please configuration. --- ....release-please-manifest.json => .release-please-manifest.json | 0 .github/release-please-config.json => release-please-config.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/.release-please-manifest.json => .release-please-manifest.json (100%) rename .github/release-please-config.json => release-please-config.json (100%) diff --git a/.github/.release-please-manifest.json b/.release-please-manifest.json similarity index 100% rename from .github/.release-please-manifest.json rename to .release-please-manifest.json diff --git a/.github/release-please-config.json b/release-please-config.json similarity index 100% rename from .github/release-please-config.json rename to release-please-config.json From fb227ed5fc1e5fe9f15d9ade2c7fb690b6f98e9b Mon Sep 17 00:00:00 2001 From: Thiago Durante Date: Wed, 8 Jan 2025 08:55:12 +0100 Subject: [PATCH 6/6] ci: Bump outdated `actions/checkout@v3` runner to `v4`. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bde6bb2..154e760 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: 3.4.1 @@ -29,7 +29,7 @@ jobs: needs: [lint, release-please] if: ${{ needs.release-please.outputs.release_created }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: