Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 94b49bc

Browse files
authored
Tweak CI (#111)
- Remove hard coded repo name - Switch to CMT 2.0.0
1 parent bee7632 commit 94b49bc

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/ci.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ permissions:
2424

2525
env:
2626
EXERCISES_DIRECTORY: ./exercises
27+
THIS_REPO: ${{ github.event.repository.name }}
2728

2829
jobs:
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/[email protected]
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/[email protected]
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 "[email protected]"
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

Comments
 (0)