This repository was archived by the owner on Nov 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (39 loc) · 1.55 KB
/
build.yml
File metadata and controls
40 lines (39 loc) · 1.55 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
# ref https://github.com/microsoft/setup-msbuild
name: Build
on:
push:
branches:
# build at all branches except "master"
- '**'
- '!master'
tags-ignore:
- 'v*' # v* trigger release.yml
jobs:
build:
runs-on: windows-2019
env:
S3_BUCKET: ${{ secrets.S3_INSTALLER_BUCKET }}
GIT_BRANCH: ${{ github.ref }}
INSTALLER_FOLDER: .\BuffettCodeExcelAddin32Installer\bin\Release
steps:
- uses: actions/checkout@v1
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
- name: Install dependencies
run: .\scripts\install_dependencies.ps1
- name: Run MSBuild as Release mode
run: MSBuild BuffettCode.sln /p:Configuration=Release
- name: Run VSTest using Test API Token
run: .\scripts\run_all_tests.ps1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-1
- name: Sign the built installer using test signing certificate
run: ./scripts/sign_installer_for_build.ps1 .\Certificates\BuffettCodeTest.pfx "${{ env.INSTALLER_FOLDER }}\BuffettCodeExcelAddin32Installer.exe"
- name: Upload new Installer to s3
run: .\scripts\upload_new_installer.ps1 "$env:INSTALLER_FOLDER" "$env:S3_BUCKET" "$env:GIT_BRANCH".Replace('refs/heads', 'build/branches')