@@ -24,6 +24,7 @@ permissions:
24
24
25
25
env :
26
26
EXERCISES_DIRECTORY : ./exercises
27
+ THIS_REPO : ${{ github.event.repository.name }}
27
28
28
29
jobs :
29
30
list-exercises :
@@ -80,14 +81,14 @@ jobs:
80
81
- name : Checkout Course Repo
81
82
uses : actions/checkout@v3
82
83
with :
83
- path : lunatech-scala-2-to-scala3-course
84
+ path : ${{ env.THIS_REPO }}
84
85
fetch-depth : 0
85
86
86
87
- name : Setup Course Management Tools
87
88
88
89
with :
89
90
repository : lunatech-labs/course-management-tools
90
- tag : " 2.0.0-RC6 "
91
+ tag : " 2.0.0"
91
92
fileName : " course-management-tools.zip"
92
93
out-file-path : " ."
93
94
- run : |
@@ -103,23 +104,23 @@ jobs:
103
104
- name : Setup Coursier Cache
104
105
105
106
with :
106
- root : " lunatech-scala-2-to-scala3-course "
107
+ root : ${{ env.THIS_REPO }}
107
108
108
109
- name : Studentify Repo
109
110
run : |
110
111
mkdir -p studentified
111
112
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
112
113
git config --global user.email "[email protected] "
113
114
git config --global user.name "Lunatech Labs"
114
- cmta studentify -f -g -m lunatech-scala-2-to-scala3-course -d studentified
115
- (cd studentified && exec zip -r lunatech-scala-2-to-scala3-course- student.zip lunatech-scala-2-to-scala3-course )
115
+ cmta studentify -f -g -m ${{ env.THIS_REPO }} -d studentified
116
+ (cd studentified && exec zip -r ${{ env.THIS_REPO }}- student.zip ${{ env.THIS_REPO }} )
116
117
117
118
- name : Linearize Repo
118
119
run : |
119
120
mkdir -p linearized
120
- cmta linearize -f -m lunatech-scala-2-to-scala3-course -d linearized
121
- mv linearized/lunatech-scala-2-to-scala3-course linearized/lunatech-scala-2-to-scala3-course -linearized
122
- (cd linearized && exec zip -r lunatech-scala-2-to-scala3-course- linearized.zip lunatech-scala-2-to-scala3-course -linearized)
121
+ cmta linearize -f -m ${{ env.THIS_REPO }} -d linearized
122
+ mv linearized/${{ env.THIS_REPO }} linearized/${{ env.THIS_REPO }} -linearized
123
+ (cd linearized && exec zip -r ${{ env.THIS_REPO }}- linearized.zip ${{ env.THIS_REPO }} -linearized)
123
124
124
125
- name : Create Github Release
125
126
id : create_release
@@ -138,8 +139,8 @@ jobs:
138
139
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
139
140
with :
140
141
upload_url : ${{ steps.create_release.outputs.upload_url }} # release created from previous step
141
- asset_path : ./studentified/lunatech-scala-2-to-scala3-course -student.zip
142
- asset_name : lunatech-scala-2-to-scala3-course -student.zip
142
+ asset_path : ./studentified/${{ env.THIS_REPO }} -student.zip
143
+ asset_name : ${{ env.THIS_REPO }} -student.zip
143
144
asset_content_type : application/zip
144
145
145
146
- name : Upload Linearized repo to Github release
@@ -148,6 +149,7 @@ jobs:
148
149
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149
150
with :
150
151
upload_url : ${{ steps.create_release.outputs.upload_url }} # release created from previous step
151
- asset_path : ./linearized/lunatech-scala-2-to-scala3-course -linearized.zip
152
- asset_name : lunatech-scala-2-to-scala3-course -linearized.zip
152
+ asset_path : ./linearized/${{ env.THIS_REPO }} -linearized.zip
153
+ asset_name : ${{ env.THIS_REPO }} -linearized.zip
153
154
asset_content_type : application/zip
155
+
0 commit comments