# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: SASjs Core - Update all.sas

on:
  push:
    branches-ignore:
      - main

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          npm ci
          npm i -g @sasjs/cli@latest

      - name: Ensure all.sas is always up to date
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          python3 build.py
          git add all.sas
          git commit -m "chore: updating all.sas" --allow-empty
          git push


