-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
Task/add ci and release
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: install selene | ||
run: | | ||
curl https://github.com/Kampfkarren/selene/releases/download/0.9.1/selene-linux -L -o selene | ||
chmod +x ./selene | ||
- name: run selene | ||
run: ./selene ./src | ||
unit-tests: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: download roblox install script | ||
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/install.py" -OutFile install.py | ||
- name: download settings file | ||
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/OrbitalOwen/roblox-win-installer/master/GlobalSettings_13.xml" -OutFile GlobalSettings_13.xml | ||
- name: install pip deps | ||
run: pip install wget psutil | ||
- name: install roblox | ||
run: python install.py "${{ secrets.ROBLOSECURITY }}" | ||
- name: install foreman | ||
uses: rojo-rbx/setup-foreman@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: install foreman packages (rojo, run-in-roblox) | ||
run: foreman install | ||
- name: install wally packages | ||
run: wally install | ||
- name: run rojo build | ||
run: rojo build -o .\\unit_tests.rbxlx .\\unit-tests.project.json | ||
- name: run tests | ||
run: run-in-roblox --place .\\unit_tests.rbxlx --script .\\spec.server.lua |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install python dependencies | ||
run: pip3 install -r requirements.txt | ||
- name: get wally version | ||
id: get_wally_version | ||
run: echo "::set-output name=version-string::$(python3 ./scripts/get_wally_version_string.py)" | ||
- name: install foreman | ||
uses: rojo-rbx/setup-foreman@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: install foreman packages (rojo, run-in-roblox) | ||
run: foreman install | ||
- name: install wally packages | ||
run: wally install | ||
- name: run rojo build | ||
run: rojo build -o ./linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx ./standalone-model.project.json | ||
- name: create-release | ||
uses: actions/create-release@latest | ||
id: create_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: ${{ steps.get_wally_version.outputs.version-string }} | ||
tag_name: ${{ steps.get_wally_version.outputs.version-string }} | ||
body_path: CHANGELOG.md | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: upload rbxmx file to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx | ||
asset_name: linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx | ||
asset_content_type: form | ||
- name: upload rbxmx file to Roblox | ||
run: | | ||
cd ./scripts | ||
python upload_model.py -a ${{ secrets.ASSET_ID }} -f ../linalg-${{ steps.get_wally_version.outputs.version-string }}.rbxmx -r "${{ secrets.UPLOADER_BOT_ROBLOSECURITY }}" | ||
cd .. | ||
- name: prepare wally package contents | ||
run: | | ||
mkdir -p ~/temp/linalg | ||
cp -r ./{include,out} ~/temp/linalg/ | ||
cp ./{CHANGELOG.md,LICENSE,README.md,wally.lock,wally.toml} ~/temp/linalg/ | ||
cp ./standalone-model.project.json ~/temp/linalg/default.project.json | ||
mkdir ~/temp/linalg/node_modules | ||
cp -r ./node_modules/@rbxts ~/temp/linalg/node_modules/ | ||
- name: prepare wally auth | ||
run: | | ||
mkdir ~/.wally | ||
echo -e '${{ secrets.WALLY_AUTH }}' > ~/.wally/auth.toml | ||
- name: publish wally package | ||
run: wally publish --project-path ~/temp/linalg/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.vscode | ||
quickTesting.lua | ||
luacov.stats.out | ||
Packages |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Releases! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[tools] | ||
rojo = { source = "rojo-rbx/rojo", version = "6" } | ||
run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" } | ||
wally = { source = "UpliftGames/wally", version = "0.2.1" } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.