Skip to content

Update main.yml

Update main.yml #71

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Cache OpenAF runtime
uses: actions/cache@v3
with:
key : oaf-nightly
path: /tmp/oaf
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Donwload openaf
- name: Download openaf
uses: openaf/ojob-action@v2
with:
ojob: build.yaml
dist: nightly
# Upload artifacts
- uses: actions/upload-artifact@v2
with:
name: nlinq.js
path: dist/nlinq.js
- uses: actions/upload-artifact@v2
with:
name: nlinq.min.js
path: dist/nlinq.min.js
- uses: actions/upload-artifact@v2
with:
name: openafnlinq.js
path: dist/openafnlinq.js
- uses: actions/upload-artifact@v2
with:
name: nlinq-test.md
path: nlinq-test.md
- run : |
# user identification
git config user.name github-actions
git config user.email github-actions@github.com
# only add/commit/push if new contents exist
if [[ $(git diff --quiet && git diff --staged --quiet) ]]; then
git add dist/nlinq.js
git add dist/nlinq.min.js
git add dist/openafnlinq.js
git add nlinq-test.md
git commit -m "update build files"
git push
fi
#- uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message : github actions artifact upload
# file_pattern : dist/*.js