Skip to content

Commit

Permalink
Add first attempt at actions file (#891)
Browse files Browse the repository at this point in the history
* Add first attempt at actions file

* add comments

* version of ubuntu no longer supported

* install deps and update changed files attempt

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* DEBUG: changed files

* test validate for pub

* test validate for pub

* latest package manager

* update lockfile

* node 18

* test working publish

* test working publish

* revert publish test

* test npm token

* test npm token

* remove test npm token
  • Loading branch information
alexkilgour authored Sep 21, 2023
1 parent 8558c35 commit a1bf596
Show file tree
Hide file tree
Showing 4 changed files with 18,216 additions and 13,549 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 18.x
steps:
- name: 'Set up Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v3
with:
node-version: '${{ matrix.node-version }}'

- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: v1-npm-deps-

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files list
id: changed_files
uses: tj-actions/changed-files@v39
with:
since_last_remote_commit: true

- name: Export changed files to env
run: |
csv=""
for result in ${{ steps.changed_files.outputs.all_changed_files }}; do
file="$result"
csv="${csv}${csv:+,}$file"
done
echo "CHANGED_FILES=$csv" >> $GITHUB_ENV
- name: Export npm token to env
run: echo "NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV

- name: Install dependencies
run: 'npm ci'

- name: Run build (lint, test, validate)
run: 'npm run bootstrap && npm run build:ci'

- name: Publish Package(s)
if: github.ref == 'refs/heads/main'
run: 'npm run publish'
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/Fermium
lts/Hydrogen
Loading

0 comments on commit a1bf596

Please sign in to comment.