@@ -24,6 +24,7 @@ permissions:
2424
2525env :
2626 EXERCISES_DIRECTORY : ./exercises
27+ THIS_REPO : ${{ github.event.repository.name }}
2728
2829jobs :
2930 list-exercises :
@@ -80,14 +81,14 @@ jobs:
8081 - name : Checkout Course Repo
8182 uses : actions/checkout@v3
8283 with :
83- path : lunatech-scala-2-to-scala3-course
84+ path : ${{ env.THIS_REPO }}
8485 fetch-depth : 0
8586
8687 - name : Setup Course Management Tools
8788 uses : robinraju/release-downloader@v1.7
8889 with :
8990 repository : lunatech-labs/course-management-tools
90- tag : " 2.0.0-RC6 "
91+ tag : " 2.0.0"
9192 fileName : " course-management-tools.zip"
9293 out-file-path : " ."
9394 - run : |
@@ -103,23 +104,23 @@ jobs:
103104 - name : Setup Coursier Cache
104105 uses : coursier/cache-action@v6.2
105106 with :
106- root : " lunatech-scala-2-to-scala3-course "
107+ root : ${{ env.THIS_REPO }}
107108
108109 - name : Studentify Repo
109110 run : |
110111 mkdir -p studentified
111112 export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
112113 git config --global user.email "no-reply@lunatech.com"
113114 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 }} )
116117
117118 - name : Linearize Repo
118119 run : |
119120 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)
123124
124125 - name : Create Github Release
125126 id : create_release
@@ -138,8 +139,8 @@ jobs:
138139 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
139140 with :
140141 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
143144 asset_content_type : application/zip
144145
145146 - name : Upload Linearized repo to Github release
@@ -148,6 +149,7 @@ jobs:
148149 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149150 with :
150151 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
153154 asset_content_type : application/zip
155+
0 commit comments