Skip to content

Replaced build number with commit hash #35

Replaced build number with commit hash

Replaced build number with commit hash #35

Workflow file for this run

name: build-test
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Install Nim'
uses: iffy/install-nim@v5
- name: 'Setup Nim'
uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.x'
- name: 'Build Catnip'
run: nim release
- name: 'Install Figlet'
run: sudo apt-get install figlet
- name: 'Run Tests'
run: cd tests && ./commandline_args.sh
- name: 'Set CURRENTCOMMIT const'
run: echo 'const CURRENTCOMMIT* = "${{ github.sha }}"' > ./src/catniplib/global/currentcommit.nim
- name: 'Push changes'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "Automatic build Number update"
git push