-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (31 loc) · 1.06 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: upload
on:
push:
branches:
- main
workflow_dispatch:
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install
- run: npm run build
- name: Create a tar archive
run: |
cd ..
tar --exclude=.git* --exclude=node_modules/* --exclude=src/* -czvf sftp-service.tar.gz sftp-service
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Copy package to S3
run: |
aws s3 cp ../sftp-service.tar.gz s3://permanent-repos/dev/sftp-service.tar.gz
aws s3 cp ../sftp-service.tar.gz s3://permanent-repos/staging/sftp-service.tar.gz
aws s3 cp ../sftp-service.tar.gz s3://permanent-repos/prod/sftp-service.tar.gz