Skip to content

Commit a2f5ba4

Browse files
committed
Adds Rakefile task to package and run the same in Github Actions.
This change introduces a new target in the Rakefile for building a tar.gz of the code. This tar can then be uploaded to Github Actions.
1 parent 93c0149 commit a2f5ba4

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/ruby.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ jobs:
3232
uses: coverallsapp/github-action@master
3333
with:
3434
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Create a tar.gz
36+
run: bundle exec rake package
37+
- uses: actions/upload-artifact@v2
38+
with:
39+
name: 'aws-codedeploy-agent-tar'
40+
path: 'pkg/aws-codedeploy-agent-1.3.2.tar.gz'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ deployment/
1111
.idea/
1212
.DS_STORE
1313
*.iml
14+
pkg/

Rakefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ def getAgentTrackingInfo
5151
end
5252
end
5353

54+
# Packaging into a tar
55+
require 'rake/packagetask'
56+
Rake::PackageTask.new("aws-codedeploy-agent", "1.3.2") do |p|
57+
p.need_tar_gz = true
58+
p.package_files.include("*")
59+
end
60+
5461
# Clean up
5562
task :clean do
5663
rm_rf 'deployment'
64+
rm_rf 'pkg'
5765
end

0 commit comments

Comments
 (0)