Skip to content

Commit

Permalink
Add workflow for building and publishing dolos-parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
rien committed Feb 16, 2024
1 parent f14ac9c commit a6eaa0f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,47 @@ jobs:
yarn build
yarn test -v --serial
parsers-build:
name: "Parsers πŸ‘“ - build πŸ”§"
runs-on: ubuntu-latest
needs: install-deps
strategy:
matrix:
node: [ "16", "18", "20" ]
fail-fast: false
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
with:
submodules: true

- name: Setup Node πŸ“š
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Fetch Dependencies ⚑️
id: cache-dependencies
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/*/node_modules
${{ github.workspace }}/parsers/build
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('./yarn.lock', './package.json', './*/package.json', './parsers/binding.gyp', './.gitmodules') }}

- name: Check if cache was hit πŸ”Ž
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
echo "Should have hit cache"
false
- name: Build πŸ”§
run: |
cd parsers/
./prepare.sh
yarn build
lib-lint:
name: "Lib πŸ“š - lint πŸ“"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -530,6 +571,12 @@ jobs:
cd core/
yarn build
- name: Build parsers πŸ”§
run: |
cd parsers/
./prepare.sh
yarn build
- name: Build lib πŸ”§
run: |
cd lib/
Expand All @@ -553,6 +600,14 @@ jobs:
strategy: all
access: public

- name: Publish @dodona/dolos-parsers to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./parsers/package.json
strategy: all
access: public

- name: Publish @dodona/dolos-lib to NPM
uses: JS-DevTools/npm-publish@v3
with:
Expand Down

0 comments on commit a6eaa0f

Please sign in to comment.