-
Notifications
You must be signed in to change notification settings - Fork 42
57 lines (47 loc) · 1.31 KB
/
main.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
54
55
56
57
name: Build & Deploy
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 3.1.101
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Upload artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: HearthDb.dll
path: "./HearthDb/bin/Release/netstandard2.0/HearthDb.dll"
deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push'
permissions:
id-token: write
contents: read
steps:
- name: Download artifact
uses: actions/[email protected]
with:
name: HearthDb.dll
path: bin
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ vars.HDT_LIBS_AWS_DEPLOY_ROLE_ARN }}
aws-region: us-east-1
- name: Deploy
run: aws s3 cp bin/*.dll s3://libs.hearthsim.net/hdt/