mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
b0b1091554
Fixes the deprecation warnings during workflow builds
80 lines
3.1 KiB
YAML
80 lines
3.1 KiB
YAML
# github workflow to automate builds
|
|
|
|
name: Windows build
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
# events but only for the master branch
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
# 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:
|
|
name: Visual Studio
|
|
|
|
# The type of runner that the job will run on
|
|
runs-on: windows-2022
|
|
|
|
# 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@v3
|
|
|
|
- name: Fetch Git tags
|
|
shell: cmd
|
|
run: git fetch --prune --unshallow --tags
|
|
|
|
- name: Initialize build environment
|
|
shell: cmd
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
|
|
|
# Runs a single command using the runners shell
|
|
- name: Build
|
|
shell: cmd
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
|
|
|
- name: Prepare files for packaging
|
|
shell: powershell
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 PackageTmp
|
|
|
|
- name: Upload foobar2000 component artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: foo_input_vgmstream.fb2k-component
|
|
path: ${{github.workspace}}\tmp\fb2k
|
|
|
|
- name: Upload CLI tools artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: vgmstream-win
|
|
path: ${{github.workspace}}\tmp\cli
|
|
|
|
- name: Upload foobar2000 component debug symbols artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: foo_input_vgmstream.pdb
|
|
path: ${{github.workspace}}\tmp\fb2k-p
|
|
|
|
- name: Upload CLI tools debug symbols artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: vgmstream-win.pdb
|
|
path: ${{github.workspace}}\tmp\cli-p
|
|
|
|
- name: Upload artifacts to S3
|
|
if: github.event_name != 'pull_request'
|
|
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 bin\vgmstream-win.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
aws s3 cp bin\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
aws s3 cp bin\vgmstream-win.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
aws s3 cp bin\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
|
echo ${{github.sha}} | tee latest_id_win
|
|
git describe --always | tee latest_ver_win
|
|
aws s3 cp latest_id_win s3://vgmstream-builds/ --acl public-read
|
|
aws s3 cp latest_ver_win s3://vgmstream-builds/ --acl public-read |