Skip to content

Commit

Permalink
Merge a2bf104 into 4590498
Browse files Browse the repository at this point in the history
  • Loading branch information
ssamueluk authored Sep 5, 2022
2 parents 4590498 + a2bf104 commit cc1e41f
Show file tree
Hide file tree
Showing 71 changed files with 15,328 additions and 34,514 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [12, 14, 16, 18]
node-version: [14, 16, 18]

steps:
- uses: actions/checkout@v2
Expand Down
38 changes: 32 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ on:
types:
- published

env:
SAR_BUCKET_NAME : ${{ secrets.SAR_BUCKET_NAME }}
AWS_REGION : "eu-west-1"

permissions:
id-token: write
contents: read

jobs:
release:
name: release
Expand All @@ -15,19 +23,37 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 16.x
registry-url: "https://registry.npmjs.org"
- name: Use npm 7.5
run: npm install -g npm@^7
- name: Use npm 8
run: npm install -g npm@^8
- name: Test NPM login
run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- uses: aws-actions/setup-sam@v2
- name: Install dependencies
run: npm ci
- name: Npm security audit
- name: NPM security audit
run: npm run audit
- name: Release
run: npm run lerna:publish
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.SAR_DEPLOYMENT_IAM_ROLE }}
role-session-name: github-action-sar-deploy-session
aws-region: ${{ env.AWS_REGION }}
- name: NPM publish
run: |
cp README.md serverless-plugin
[[ "${{ github.event.release.prerelease }}" = true ]] && export NPM_PUBLISH_ARGS="--tag next" || export NPM_PUBLISH_ARGS=""
npm publish ${NPM_PUBLISH_ARGS} --workspace slic-watch-core --workspace serverless-slic-watch-plugin
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: SAR publish
run: |
sam build --base-dir . --template-file cf-macro/template.yaml
sam package --output-template-file packaged.yaml --s3-bucket ${SAR_BUCKET_NAME}
sam publish --template packaged.yaml --region ${AWS_REGION} --semantic-version $(cat package.json | jq -r '.version')
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,8 @@ node_modules/
coverage/
.vscode/
.eslintcache
lerna-debug*
lerna-debug*


samconfig.toml
packaged.yaml
Loading

0 comments on commit cc1e41f

Please sign in to comment.