Skip to content

Commit

Permalink
Increase release task
Browse files Browse the repository at this point in the history
  • Loading branch information
buty4649 committed Jun 17, 2023
1 parent d03e06e commit 69ae07f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
with:
ruby-version: 3.2
bundler-cache: true
- name: Build
run: rake release
- name: Build assets
run: rake build:assets
- name: Create release tag
env:
GH_TOKEN: ${{ github.token }}
Expand Down
19 changes: 17 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ namespace :build do
docker_run(env:)
end
end

desc 'Build assets files for all targets'
task assets: %w[clean build:all] do
archive_binary_file(build_targets, "v#{Rf::VERSION}")
end
end

desc 'Cleanup build cache'
Expand All @@ -71,9 +76,19 @@ task 'deep_clean' do
docker_run(cmd: 'deep_clean', env:)
end

desc 'Release the project'
desc 'Bumpup minor version and release'
task release: %w[clean build:all] do
archive_binary_file(build_targets, "v#{Rf::VERSION}")
version = Rf::VERSION.split('.')
version[1].succ! # increment minor version
File.write('mrblib/rf/version.rb', <<~VERSION)
module Rf
VERSION = '#{version.join('.').inspect}'
end
VERSION
sh 'git add mrblib/rf/version.rb'
sh "git commit -m '#{version.join('.')}'"
sh "git tag v#{version.join('.')}"
sh "git push origin v#{version.join('.')}"
end

desc 'Run RSpec with parallel_rspec'
Expand Down

0 comments on commit 69ae07f

Please sign in to comment.