Skip to content

Commit 225cff6

Browse files
authored
Adds deployment notifications (#40)
1 parent 8412b00 commit 225cff6

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,21 @@ jobs:
77
publish:
88
name: Publish
99
runs-on: ubuntu-latest
10+
env:
11+
TARGET_URL: https://rubygems.org/gems/patch_ruby
12+
1013
steps:
1114
- name: Check out code
1215
uses: actions/checkout@v2
1316

17+
- uses: chrnorm/deployment-action@releases/v1
18+
name: Create GitHub deployment
19+
id: deployment
20+
with:
21+
token: "${{ github.token }}"
22+
target_url: ${{ env.TARGET_URL }}
23+
environment: production
24+
1425
- name: Setup Ruby
1526
uses: ruby/setup-ruby@v1
1627
with:
@@ -32,3 +43,20 @@ jobs:
3243
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
3344
run: gem push patch_ruby.gem
3445

46+
- name: Update deployment status (success)
47+
if: success()
48+
uses: chrnorm/deployment-status@releases/v1
49+
with:
50+
token: "${{ github.token }}"
51+
target_url: ${{ env.TARGET_URL }}
52+
state: "success"
53+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
54+
55+
- name: Update deployment status (failure)
56+
if: failure()
57+
uses: chrnorm/deployment-status@releases/v1
58+
with:
59+
token: "${{ github.token }}"
60+
target_url: ${{ env.TARGET_URL }}
61+
state: "failure"
62+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
patch_ruby (1.10.1)
4+
patch_ruby (1.10.2)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM
@@ -22,7 +22,7 @@ GEM
2222
ffi (>= 1.15.0)
2323
factory_bot (6.2.0)
2424
activesupport (>= 5.0.0)
25-
ffi (1.15.3)
25+
ffi (1.15.4)
2626
i18n (1.8.10)
2727
concurrent-ruby (~> 1.0)
2828
jaro_winkler (1.5.4)

lib/patch_ruby/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ApiClient
3131
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
3232
def initialize(config = Configuration.default)
3333
@config = config
34-
@user_agent = "patch-ruby/1.10.1"
34+
@user_agent = "patch-ruby/1.10.2"
3535
@default_headers = {
3636
'Content-Type' => 'application/json',
3737
'User-Agent' => @user_agent

lib/patch_ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module Patch
14-
VERSION = '1.10.1'
14+
VERSION = '1.10.2'
1515
end

0 commit comments

Comments
 (0)