-
Notifications
You must be signed in to change notification settings - Fork 14
48 lines (40 loc) · 1.02 KB
/
s3.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
name: cd
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
id-token: write
jobs:
build-publish:
name: Build and publish to S3
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- name: Create build folder
run: mkdir -p build
- name: Execute build
run: make release_assets
- name: Configure AWS credentials
if: ${{ github.event_name == 'push' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::825951051969:role/gha-downloads-role
aws-region: us-east-1
- name: Deploy to S3
if: ${{ github.event_name == 'push' }}
run: aws s3 sync $SOURCE_DIR s3://$BUCKET
env:
BUCKET: downloads.split.io
SOURCE_DIR: ./build