Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak CI #111

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ permissions:

env:
EXERCISES_DIRECTORY: ./exercises
THIS_REPO: ${{ github.event.repository.name }}

jobs:
list-exercises:
Expand Down Expand Up @@ -80,14 +81,14 @@ jobs:
- name: Checkout Course Repo
uses: actions/checkout@v3
with:
path: lunatech-scala-2-to-scala3-course
path: ${{ env.THIS_REPO }}
fetch-depth: 0

- name: Setup Course Management Tools
uses: robinraju/[email protected]
with:
repository: lunatech-labs/course-management-tools
tag: "2.0.0-RC6"
tag: "2.0.0"
fileName: "course-management-tools.zip"
out-file-path: "."
- run: |
Expand All @@ -103,23 +104,23 @@ jobs:
- name: Setup Coursier Cache
uses: coursier/[email protected]
with:
root: "lunatech-scala-2-to-scala3-course"
root: ${{ env.THIS_REPO }}

- name: Studentify Repo
run: |
mkdir -p studentified
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
git config --global user.email "[email protected]"
git config --global user.name "Lunatech Labs"
cmta studentify -f -g -m lunatech-scala-2-to-scala3-course -d studentified
(cd studentified && exec zip -r lunatech-scala-2-to-scala3-course-student.zip lunatech-scala-2-to-scala3-course)
cmta studentify -f -g -m ${{ env.THIS_REPO }} -d studentified
(cd studentified && exec zip -r ${{ env.THIS_REPO }}-student.zip ${{ env.THIS_REPO }})

- name: Linearize Repo
run: |
mkdir -p linearized
cmta linearize -f -m lunatech-scala-2-to-scala3-course -d linearized
mv linearized/lunatech-scala-2-to-scala3-course linearized/lunatech-scala-2-to-scala3-course-linearized
(cd linearized && exec zip -r lunatech-scala-2-to-scala3-course-linearized.zip lunatech-scala-2-to-scala3-course-linearized)
cmta linearize -f -m ${{ env.THIS_REPO }} -d linearized
mv linearized/${{ env.THIS_REPO }} linearized/${{ env.THIS_REPO }}-linearized
(cd linearized && exec zip -r ${{ env.THIS_REPO }}-linearized.zip ${{ env.THIS_REPO }}-linearized)

- name: Create Github Release
id: create_release
Expand All @@ -138,8 +139,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # release created from previous step
asset_path: ./studentified/lunatech-scala-2-to-scala3-course-student.zip
asset_name: lunatech-scala-2-to-scala3-course-student.zip
asset_path: ./studentified/${{ env.THIS_REPO }}-student.zip
asset_name: ${{ env.THIS_REPO }}-student.zip
asset_content_type: application/zip

- name: Upload Linearized repo to Github release
Expand All @@ -148,6 +149,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # release created from previous step
asset_path: ./linearized/lunatech-scala-2-to-scala3-course-linearized.zip
asset_name: lunatech-scala-2-to-scala3-course-linearized.zip
asset_path: ./linearized/${{ env.THIS_REPO }}-linearized.zip
asset_name: ${{ env.THIS_REPO }}-linearized.zip
asset_content_type: application/zip

Loading