-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.35 KB
/
dev-release.yml
File metadata and controls
52 lines (44 loc) · 1.35 KB
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
name: dev-release
on:
push:
branches:
- dev
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
push-to-s3:
runs-on: ubuntu-latest
steps:
- name: Setup golang
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Manage cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -v ./...
- name: Create build directory
run: mkdir -p installer-contents
- name: Build cross compilation binary
run: make cross
- name: Copy contents to be ported to s3
run: mv bin/* weeve-agent.service weeve-agent-installer.sh weeve-agent-uninstaller.sh ./installer-contents
- name: Directory to installer-contents
run: ls -la ./installer-contents
- name: Release Binary to S3
uses: jakejarvis/s3-sync-action@master
env:
AWS_S3_BUCKET: weeve-agent-dev
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-central-1
SOURCE_DIR: ./installer-contents