Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added yaml update with automated workflow #3366

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: www

- uses: actions/checkout@v4
with:
repository: ruby/ruby
path: ruby

- uses: ruby/setup-ruby@v1
with:
Expand All @@ -25,6 +32,11 @@ jobs:
run: |
ruby lib/draft-release.rb ${{ github.event.client_payload.version || github.event.inputs.version }}

- name: Update data files
run: |
tool/format-release ../www ${{ github.event.client_payload.version || github.event.inputs.version }} .
working-directory: ruby

- name: Create Commit
run: |
git config user.name "GitHub Actions Bot"
Expand All @@ -43,3 +55,5 @@ jobs:
title: "Create release for ${{ github.event.client_payload.version || github.event.inputs.version }}"
body: "This is an automated pull request to create a release"
draft: true

working-directory: www
2 changes: 1 addition & 1 deletion lib/draft-release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
template = File.read("lib/release-template.erb")
version = ARGV[0] || "3.3.4"

output_path = "en/news/_posts/#{Time.now.strftime("%Y-%m-%d")}-#{version.gsub(/\./, "-")}-released.md"
output_path = "en/news/_posts/ruby-#{Time.now.strftime("%Y-%m-%d")}-#{version.gsub(/\./, "-")}-released.md"

File.open(output_path, "w") do |file|
file.write ERB.new(template).result(binding)
Expand Down