Merge pull request #422 from Ajay-aot/bugfix/FWF-4201-tables-style-co… #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: forms-flow-components-CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- develop | |
- FWF-3440-Design-System-MF | |
- release/* | |
paths: | |
- "forms-flow-components/**" | |
- "VERSION" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build and push artifacts to s3 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.17.0' | |
- name: Set version | |
if: ${{ github.ref != 'refs/heads/main' }} | |
working-directory: . | |
run: | | |
VER=$(cat VERSION) | |
echo "VERSION=$VER" >> $GITHUB_ENV | |
- name: Set version | |
if: ${{ github.ref == 'refs/heads/main' }} | |
working-directory: . | |
run: | | |
VER=$(cat VERSION) | |
VER=${VER/-alpha/''} | |
echo "VERSION=$VER" >> $GITHUB_ENV | |
#TODO: force installing due to dependency conflict need to resolve the dependency | |
- run: npm ci --force | |
working-directory: ./forms-flow-components | |
- run: npm run build:webpack | |
working-directory: ./forms-flow-components | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.REGION }} | |
- run: npm ci | |
working-directory: ./scripts | |
- run: node index forms-flow-components | |
env: | |
BUCKET: ${{ secrets.BUCKET}} | |
VERSION: ${{ env.VERSION }} | |
working-directory: ./scripts |