-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.23 KB
/
build.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build
on:
push:
branches:
- "*"
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_DEFAULT_REGION: eu-central-1
steps:
- uses: actions/checkout@v4
- name: Create GIT_DESCRIBE variable
run: |
echo "GIT_DESCRIBE=$(git describe --broken --tags --always)" >> $GITHUB_ENV
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.10.0
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm --version && pnpm install --frozen-lockfile
- name: Build zip
run: bash etc/commands/build.sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: eu-central-1
- name: Copy ZIP
run: aws s3 cp artifact.zip ${{ env.AWS_BUCKET }}/lambda-mailer-${{ env.GIT_DESCRIBE }}.zip --quiet
- name: ZIP tag
run: echo "${{ env.GIT_DESCRIBE }}"