2020-10-05 04:36:24 +02:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
2020-11-07 19:43:23 +01:00
|
|
|
name: Windows build
|
2020-10-05 04:36:24 +02:00
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
|
|
# events but only for the master branch
|
2020-10-11 01:45:39 +02:00
|
|
|
on: [push, pull_request]
|
2020-10-05 04:36:24 +02:00
|
|
|
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
jobs:
|
|
|
|
# This workflow contains a single job called "build"
|
|
|
|
build:
|
2020-11-07 19:43:23 +01:00
|
|
|
name: VS 2017
|
|
|
|
|
2020-10-05 04:36:24 +02:00
|
|
|
# The type of runner that the job will run on
|
|
|
|
runs-on: windows-2016
|
|
|
|
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
|
|
steps:
|
|
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
|
|
- uses: actions/checkout@v2
|
2020-10-19 03:22:56 +02:00
|
|
|
|
|
|
|
- name: Fetch Git tags
|
|
|
|
shell: cmd
|
|
|
|
run: git fetch --prune --unshallow --tags
|
2020-10-05 04:36:24 +02:00
|
|
|
|
|
|
|
- name: Initialize Build Environment
|
|
|
|
shell: cmd
|
|
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\build.ps1 Init
|
|
|
|
|
|
|
|
# Runs a single command using the runners shell
|
|
|
|
- name: Build
|
|
|
|
shell: cmd
|
|
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\build.ps1 Build
|
|
|
|
|
|
|
|
- name: Prepare Files For Packaging
|
|
|
|
shell: powershell
|
|
|
|
run: |
|
|
|
|
$fb2kFiles = @(
|
|
|
|
"ext_libs/*.dll",
|
|
|
|
"Release/foo_input_vgmstream.dll",
|
|
|
|
"README.md"
|
|
|
|
)
|
|
|
|
|
|
|
|
$cliFiles = @(
|
|
|
|
"ext_libs/*.dll",
|
|
|
|
"Release/in_vgmstream.dll",
|
|
|
|
"Release/test.exe",
|
|
|
|
"Release/xmp-vgmstream.dll",
|
|
|
|
"COPYING",
|
|
|
|
"README.md"
|
|
|
|
)
|
|
|
|
|
|
|
|
$fb2kPdbFiles = @(
|
|
|
|
"Release/foo_input_vgmstream.pdb"
|
|
|
|
)
|
|
|
|
|
|
|
|
$cliPdbFiles = @(
|
|
|
|
"Release/in_vgmstream.pdb",
|
|
|
|
"Release/test.pdb",
|
|
|
|
"Release/xmp-vgmstream.pdb"
|
|
|
|
)
|
|
|
|
|
2020-11-17 00:01:17 +01:00
|
|
|
Compress-Archive $cliFiles Release/test.zip -Force
|
|
|
|
Compress-Archive $fb2kFiles Release/foo_input_vgmstream.zip -Force
|
|
|
|
Move-Item Release/foo_input_vgmstream.zip Release/foo_input_vgmstream.fb2k-component -Force
|
|
|
|
Compress-Archive $cliPdbFiles Release/test.pdb.zip -Force
|
|
|
|
Compress-Archive $fb2kPdbFiles Release/foo_input_vgmstream.pdb.zip -Force
|
|
|
|
|
2020-10-05 04:36:24 +02:00
|
|
|
mkdir tmp/cli
|
|
|
|
mkdir tmp/fb2k
|
|
|
|
mkdir tmp/cli-p
|
|
|
|
mkdir tmp/fb2k-p
|
|
|
|
|
|
|
|
Copy-Item $cliFiles tmp/cli/ -Recurse -Force
|
|
|
|
Copy-Item $fb2kFiles tmp/fb2k/ -Recurse -Force
|
|
|
|
Copy-Item $cliPdbFiles tmp/cli-p/ -Recurse -Force
|
|
|
|
Copy-Item $fb2kPdbFiles tmp/fb2k-p/ -Recurse -Force
|
|
|
|
|
|
|
|
- name: Upload foobar2000 Component Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: foo_input_vgmstream.fb2k-component
|
|
|
|
path: ${{github.workspace}}\tmp\fb2k
|
|
|
|
|
|
|
|
- name: Upload CLI Tools Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: test
|
|
|
|
path: ${{github.workspace}}\tmp\cli
|
|
|
|
|
|
|
|
- name: Upload foobar2000 Component Debug Symbols Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: foo_input_vgmstream.pdb
|
|
|
|
path: ${{github.workspace}}\tmp\fb2k-p
|
|
|
|
|
|
|
|
- name: Upload CLI Tools Debug Symbols Artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: test.pdb
|
|
|
|
path: ${{github.workspace}}\tmp\cli-p
|
2020-10-05 05:54:45 +02:00
|
|
|
|
|
|
|
- name: Upload Artifacts to S3
|
2020-10-11 01:45:39 +02:00
|
|
|
if: github.event_name != 'pull_request'
|
2020-10-05 05:54:45 +02:00
|
|
|
working-directory: ${{github.workspace}}
|
|
|
|
shell: powershell
|
|
|
|
env:
|
|
|
|
AWS_DEFAULT_REGION: us-west-1
|
|
|
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
|
|
|
run: |
|
|
|
|
aws s3 cp Release\test.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
|
|
aws s3 cp Release\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
|
|
aws s3 cp Release\test.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
|
|
aws s3 cp Release\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
2020-10-05 09:37:30 +02:00
|
|
|
echo ${{github.sha}} > latest_id
|
2020-10-19 03:22:56 +02:00
|
|
|
aws s3 cp latest_id s3://vgmstream-builds/ --acl public-read
|