Skip to content

update workflow

update workflow #288

Workflow file for this run

name: test
on:
push:
paths-ignore:
- LICENSE
- README.*
- examples
- editors
pull_request:
paths-ignore:
- LICENSE
- README.*
- examples
- editors
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
nim-version:
- 'stable'
os:
- ubuntu-latest
# - windows-latest
- macOS-latest
steps:
- uses: actions/checkout@v2
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
# - run: sudo apt-get -y install libsass-dev
- run: "npm install cmake-js -g"
- run: "choosenim show path -y"
- run: nimble install -Y
- run: nimble test
- run: denim build src/${{ github.event.repository.name }}.nim -r -y --cmake
- name: "update tim.node"
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
timNodeName="tim-$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]').node"
git pull origin main
git checkout .
rm -f ./bindings/node/tim/src/bin/$timNodeName
git add ./bindings/node/tim/src/bin/$timNodeName
git commit -m "cleanup previous tim.node"
cp ./bin/tim.node ./bindings/node/tim/src/bin/$timNodeName
git status
git add ./bindings/node/tim/src/bin/$timNodeName
git commit -m "update tim for node on ${{ runner.os }}"
- name: Push changes # push the output folder to your repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'main'