Skip to content

Commit

Permalink
Merge pull request #5 from BBVA/feature/github-actions-integration
Browse files Browse the repository at this point in the history
Feature/GitHub actions integration
  • Loading branch information
davidigza authored Jun 3, 2024
2 parents 2d52955 + 9c4c148 commit cac6b7a
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build node CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
- run: npm run build --if-present
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish to NPM
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
run: |
npm i --package-lock-only
npm ci
npm run build --if-present
- name: Publish core package on NPM.js
working-directory: ./packages/core
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish core-plugin package on NPM.js
working-directory: ./packages/core-plugin
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish element-controller package on NPM.js
working-directory: ./packages/element-controller
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish page-controller package on NPM.js
working-directory: ./packages/page-controller
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish page-mixin package on NPM.js
working-directory: ./packages/page-mixin
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish page-transitions package on NPM.js
working-directory: ./packages/page-transitions
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish localize package on NPM.js
working-directory: ./packages/localize
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish create-app package on NPM.js
working-directory: ./packages/create-app
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 comments on commit cac6b7a

Please sign in to comment.