fix release publishing #71
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: CI | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
upstream-version: | |
description: Upstream aws-cdk version to use in tests | |
required: false | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Build and Lint | |
run: | | |
npm install | |
npm run lint | |
- name: Install AWS CLI | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- run: pip install awscli | |
- name: Configure AWS credentials | |
run: | | |
aws configure set aws_access_key_id "AKIAI44QH8DHBEXAMPLE" --profile default | |
aws configure set aws_secret_access_key "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" --profile default | |
aws configure set region "us-east-1" --profile default | |
aws configure set output "json" --profile default | |
- name: Install Amplify CLI | |
run: npm install -g @aws-amplify/cli | |
- name: Set up Amplify Plugin | |
run: | | |
npm -g install . | |
amplify plugin scan | |
- name: Install Localstack | |
run: pip install localstack | |
- name: Start and wait for localstack | |
timeout-minutes: 5 | |
run: | | |
docker pull localstack/localstack-pro:latest | |
LOCALSTACK_API_KEY=${{ secrets.LOCALSTACK_API_KEY }} DEBUG=1 localstack start -d | |
localstack wait -t 30 | |
- name: Init Amplify Project | |
run: | | |
mkdir test_project | |
cd test_project | |
amplify init --envName test --yes --use-localstack true | |
- name: Add Auth Resource | |
working-directory: test_project | |
run: | | |
cat ../headlessRequests/addAuth.json | jq -c | amplify add auth --headless | |
- name: Add Storage Resource | |
working-directory: test_project | |
run: | | |
cat ../headlessRequests/addStorage.json | jq -c | amplify add storage --headless | |
- name: Add Api Resource | |
working-directory: test_project | |
run: | | |
cat ../headlessRequests/addApi.json | jq -c | amplify add api --headless | |
- name: Push Resources | |
working-directory: test_project | |
run: amplify push --use-localstack true --yes |