Skip to content

Commit

Permalink
Merge pull request #38 from artichoke/lopopolo/set-output-stdout-depr…
Browse files Browse the repository at this point in the history
…ecated

Address deprecated 'set-output' command in GitHub Actions
  • Loading branch information
lopopolo authored Nov 1, 2022
2 parents acc507c + 4240ac7 commit a0cece1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.3.0

Released 2022-10-31.

### Bug Fixes

- Address deprecated 'set-output' command in GitHub Actions. [#38]

[#38]: https://github.com/artichoke/generate_third_party/pull/38

## 1.2.0

Released 2022-10-15.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
generate_third_party (1.2.0)
generate_third_party (1.3.0)
sorbet-runtime (~> 0.5)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This repository is available as a GitHub Action:
```yaml
- name: Generate THIRDPARTY license listing
id: generate_third_party
uses: artichoke/generate_third_party@v1.2.0
uses: artichoke/generate_third_party@v1.3.0
with:
artichoke_ref: trunk
target_triple: x86_64-unknown-linux-gnu
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ runs:
run: |
gem build generate_third_party.gemspec
if [[ "${{ runner.os }}" == "Linux" ]]; then
sudo gem install generate_third_party-1.2.0.gem
sudo gem install generate_third_party-1.3.0.gem
else
gem install generate_third_party-1.2.0.gem
gem install generate_third_party-1.3.0.gem
fi
working-directory: ${{ github.action_path }}

Expand Down
2 changes: 1 addition & 1 deletion generate_third_party.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'generate_third_party'
s.version = '1.2.0'
s.version = '1.3.0'
s.required_ruby_version = '>= 2.7.0'
s.summary = "Generate Artichoke's third party dependencies"
s.description = 'Generate lists of third party dependencies and their licenses'
Expand Down
7 changes: 6 additions & 1 deletion lib/generate_third_party/bin_tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ def self.setup_script_signal_handlers!
# https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
sig { params(name: String, value: String).void }
def self.set_output(name:, value:)
puts "::set-output name=#{name}::#{value}"
out = ENV.fetch('GITHUB_OUTPUT', nil)
return if out.nil?

File.open(out, 'a') do |f|
f.puts "#{name}=#{value}"
end
end

# Create an expandable log group in GitHub Actions job logs.
Expand Down

0 comments on commit a0cece1

Please sign in to comment.