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 +4 -4
- data/.github/workflows/release.yml +54 -0
- data/Gemfile.lock +1 -1
- data/lib/ci_helper/commands/run_specs.rb +8 -3
- data/lib/ci_helper/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fae9814d6c5c741111d1ad0c088c82e559de3104654182a4f31eecd899705d6b
|
|
4
|
+
data.tar.gz: f442afb5f64aaf8624e9b7b583b90a86046975570d12dd3a8a1d30b0cf6fd51a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
@@ -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
|
-
|
|
51
|
-
|
|
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
|
data/lib/ci_helper/version.rb
CHANGED
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.
|
|
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"
|