ci-helper 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00bf40738c9997e76bf3f9c7339d1608e7bd706d7a93d4f00322f4f5b5336d4d
4
- data.tar.gz: 6612126f35b0440904ffdada78380edff042b062009d7f51b17df0797c72ee59
3
+ metadata.gz: fae9814d6c5c741111d1ad0c088c82e559de3104654182a4f31eecd899705d6b
4
+ data.tar.gz: f442afb5f64aaf8624e9b7b583b90a86046975570d12dd3a8a1d30b0cf6fd51a
5
5
  SHA512:
6
- metadata.gz: 5b0404a8c11b9dc5326654f672befed4bf0ed24d898789013b7eb00c7726b1f28f5e0aa9101cd6d0492426bcbcb79266e76064962184d873733ac392e8eec9be
7
- data.tar.gz: c64d2b1b049753074b1fe5aae027c928c30e428f4c1f9b9022385568566a2ddb24be0445f5a3e20f713533ed098f6a2efe139eb06c7dd52825cab2a47e532591
6
+ metadata.gz: df17b45dadbf7707cfcdc143eedacb2b01a210b49f107127541985f882a1f273d7578ff1e3506c0a386b357f486d40c4b5b10896d8f828bbd0eaddd784e1fdc5
7
+ data.tar.gz: 2604f25b03bfc9f2ed0cd654b8d2a0c111da92bfae8379f5b2eea8719af1d4e74ad590a94ffbf5a34d5004ce1b2f419ef453032e6f81fb35d7b03641df8a055d
@@ -0,0 +1,54 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Extract version
17
+ id: version
18
+ run: |
19
+ version=$(grep -oP '(?<=VERSION = ")[^"]+' lib/ci_helper/version.rb)
20
+ echo "tag=v$version" >> "$GITHUB_OUTPUT"
21
+
22
+ - name: Check if release already exists
23
+ id: check
24
+ run: |
25
+ if gh release view "${{ steps.version.outputs.tag }}" &>/dev/null; then
26
+ echo "exists=true" >> "$GITHUB_OUTPUT"
27
+ else
28
+ echo "exists=false" >> "$GITHUB_OUTPUT"
29
+ fi
30
+ env:
31
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - uses: ruby/setup-ruby@v1
34
+ if: steps.check.outputs.exists == 'false'
35
+ with:
36
+ ruby-version: "3.4"
37
+ bundler-cache: true
38
+
39
+ - name: Build gem
40
+ if: steps.check.outputs.exists == 'false'
41
+ run: gem build ci_helper.gemspec
42
+
43
+ - name: Push gem to RubyGems
44
+ if: steps.check.outputs.exists == 'false'
45
+ run: gem push *.gem
46
+ env:
47
+ GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
48
+
49
+ - uses: softprops/action-gh-release@v3
50
+ if: steps.check.outputs.exists == 'false'
51
+ with:
52
+ tag_name: ${{ steps.version.outputs.tag }}
53
+ files: "*.gem"
54
+ generate_release_notes: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci-helper (0.10.0)
4
+ ci-helper (0.10.1)
5
5
  colorize (~> 1.1)
6
6
  dry-inflector (~> 1.0)
7
7
  umbrellio-sequel-plugins (~> 0.14)
@@ -47,9 +47,14 @@ module CIHelper
47
47
  def example_ids
48
48
  Dir.mktmpdir do |dir|
49
49
  output_file = File.join(dir, "rspec_examples.json")
50
- execute(
51
- "bundle exec rspec --dry-run --format=json --out #{Shellwords.escape(output_file)}",
52
- )
50
+ begin
51
+ execute(
52
+ "bundle exec rspec --dry-run --format=json --out #{Shellwords.escape(output_file)}",
53
+ )
54
+ rescue Error
55
+ output = File.exist?(output_file) ? File.read(output_file) : "(no output file)"
56
+ fail!("RSpec dry-run failed. Output file contents:\n#{output}")
57
+ end
53
58
  JSON.parse(File.read(output_file)).fetch("examples").map { |e| e.fetch("id") }
54
59
  end
55
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CIHelper
4
- VERSION = "0.10.0"
4
+ VERSION = "0.10.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JustAnotherDude
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".editorconfig"
63
+ - ".github/workflows/release.yml"
63
64
  - ".github/workflows/test.yml"
64
65
  - ".gitignore"
65
66
  - ".rspec"