-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.09 KB
/
release.yaml
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
name: Releases
on:
push:
tags:
- v*.*.*
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
cache: true
- run: go build -ldflags="-X 'sls-local-server/main.Version=$(github.ref_name)'" -o sls-local-server main.go
name: Build
- run: echo $(github.ref_name) > version.txt
name: Set version file
- name: Configure AWS credentials
if: endsWith(github.ref_name, '-dev')
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_KEY }}
aws-region: us-east-1
- name: Upload to AWS if dev tag
if: endsWith(github.ref_name, '-dev')
run: |
aws s3 cp sls-local-server s3://rutvik-test-script/
aws s3 cp version.txt s3://rutvik-test-script/