simp-test 0.2.3 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f43822c09fc73ea1003786ae0681c876eadbc54dac9cec5f81faf75ad54e3a91
4
- data.tar.gz: a69ce259dccb6cf1d2ae1e338208697ed11ab6c17182b7e4560b0e0eb08dc66d
3
+ metadata.gz: b17cff246352b13cc7e41bf947f5a04ef63caea3ea562f3da5d2e32de667f1e6
4
+ data.tar.gz: a7301dc302845e2618374aa05105d62c88f1153d4c2028d137aec19662e48d00
5
5
  SHA512:
6
- metadata.gz: '02749f2ae69d9f1cb302675d46d0c89dc26c3e0acb9e0cb419097b46c0882e5cda32d89618f4e4bff6d34453b4bb9a494db6942aed8e127ac27f242a7e301ab5'
7
- data.tar.gz: f7b66193010a858369e1f7b57b64052d2a320388d891f4622629caee7c1261797f7b6578f972eb312a4625167624986123119f4829eece7f4f319ff41585baf0
6
+ metadata.gz: d279bbe7762c33ecfff5d889345b6c50a848b5130882f500104fafa36af429dbebdf11724bff93fe54ac7239cbdaf0efe158a6e05f58b2ad40bd3955e350eb5d
7
+ data.tar.gz: 42bea312ba691dddf6012df9ed2e58f1593fe7bd7d7646993f82e5d43bda4c942fd3996f2e3696e5ede28ec2dbb472bc162c67a5200b06610e003e8a79e164ce
@@ -1,6 +1,6 @@
1
1
  # Build & Deploy RubyGem & GitHub release when a SemVer tag is pushed
2
2
  #
3
- # This workflow's jobs only trigger within the `simp` organization
3
+ # This workflow's jobs are only triggered in repos under the `simp` organization
4
4
  # ------------------------------------------------------------------------------
5
5
  #
6
6
  # NOTICE: **This file is maintained with puppetsync**
@@ -23,6 +23,19 @@
23
23
  #
24
24
  # * The CHANGLOG text is altered to remove RPM-style date headers, which don't
25
25
  # render well as markdown on the GitHub release pages
26
+ #
27
+ # * By default, the gem is built and released using the standard rake tasks
28
+ # from "bundler/gem_tasks". To override these, create a JSON file at
29
+ # `.github/workflows.local.json`, using the format:
30
+ #
31
+ # {
32
+ # "gem_build_command": "bundle exec rake build",
33
+ # "gem_release_command": "bundle exec rake release",
34
+ # "gem_pkg_dir": "pkg"
35
+ # }
36
+ #
37
+ # All keys are optional.
38
+ #
26
39
  ---
27
40
  name: 'Tag: Release to GitHub & rubygems.org'
28
41
 
@@ -43,6 +56,7 @@ jobs:
43
56
  outputs:
44
57
  build_command: ${{ steps.commands.outputs.build_command }}
45
58
  release_command: ${{ steps.commands.outputs.release_command }}
59
+ pkg_dir: ${{ steps.commands.outputs.pkg_dir }}
46
60
  steps:
47
61
  - name: "Assert '${{ github.ref }}' is a tag"
48
62
  run: '[[ "$GITHUB_REF" =~ ^refs/tags/ ]] || { echo "::error ::GITHUB_REF is not a tag: ${GITHUB_REF}"; exit 1 ; }'
@@ -56,7 +70,8 @@ jobs:
56
70
  # By default, these are the standard tasks from "bundler/gem_tasks"
57
71
  # To override them in the LOCAL_WORKFLOW_CONFIG_FILE
58
72
  GEM_BUILD_COMMAND='bundle exec rake build'
59
- GEM_RELEASE_COMMAND='gem push pkg/*.gem'
73
+ GEM_PKG_DIR='pkg'
74
+ GEM_RELEASE_COMMAND='gem push ${GEM_PKG_DIR}/*.gem'
60
75
  if jq -r '. | keys' "$LOCAL_WORKFLOW_CONFIG_FILE" 2>/dev/null | \
61
76
  grep -w '"gem_build_command"' &> /dev/null; then
62
77
  GEM_BUILD_COMMAND="$(jq .gem_build_command "$LOCAL_WORKFLOW_CONFIG_FILE" )"
@@ -65,7 +80,12 @@ jobs:
65
80
  grep -w '"gem_release_command"' &> /dev/null; then
66
81
  GEM_RELEASE_COMMAND="$(jq .gem_release_command "$LOCAL_WORKFLOW_CONFIG_FILE" )"
67
82
  fi
83
+ if jq -r '. | keys' "$LOCAL_WORKFLOW_CONFIG_FILE" 2>/dev/null | \
84
+ grep -w '"gem_pkg_dir"' &> /dev/null; then
85
+ GEM_PKG_DIR="$(jq .gem_release_command "$LOCAL_WORKFLOW_CONFIG_FILE" )"
86
+ fi
68
87
  echo "::set-output name=build_command::${GEM_BUILD_COMMAND}"
88
+ echo "::set-output name=pkg_dir::${GEM_PKG_DIR}"
69
89
  echo "::set-output name=release_command::${GEM_RELEASE_COMMAND}"
70
90
  - uses: ruby/setup-ruby@v1
71
91
  with:
@@ -76,7 +96,7 @@ jobs:
76
96
  - name: "Assert '${{ github.ref }}' matches the package version"
77
97
  run: |
78
98
  tag="${GITHUB_REF/refs\/tags\//}"
79
- [ -f pkg/*-${tag}.gem ] || { echo "::error ::tag '${tag}' does not match package $(ls -1 pkg/*.gem)"; exit 1 ; }
99
+ [ -f ${{ steps.commands.outputs.pkg_dir }}/*-${tag}.gem ] || { echo "::error ::tag '${tag}' does not match package $(ls -1 ${{ steps.commands.outputs.pkg_dir }}/*.gem)"; exit 1 ; }
80
100
 
81
101
  create-github-release:
82
102
  name: Deploy GitHub Release
@@ -142,7 +162,12 @@ jobs:
142
162
  ruby-version: 2.5
143
163
  bundler-cache: true
144
164
  - name: Build RubyGem
145
- run: '$BUILD_COMMAND'
165
+ run: |
166
+ echo "Setting up file permissions..."
167
+ chmod -R go=u-w .
168
+
169
+ echo "Running '$BUILD_COMMAND'..."
170
+ $BUILD_COMMAND
146
171
 
147
172
  - name: Release RubyGem
148
173
  run: |
@@ -155,7 +180,5 @@ jobs:
155
180
  EOF
156
181
  chmod 0600 ~/.gem/credentials
157
182
 
158
- chmod -R go=u-w .
159
-
160
183
  echo "Running '$RELEASE_COMMAND'..."
161
184
  $RELEASE_COMMAND
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Simp
4
4
  module Test
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - SIMP Team
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 2.7.6.2
59
+ rubygems_version: 2.7.10
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: test gem for CI