2021-08-27 22:21:04 +02:00
|
|
|
# github workflow to automate builds
|
2020-10-05 04:36:24 +02:00
|
|
|
|
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
|
2022-08-30 20:45:22 +02:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
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:
|
2021-12-07 06:13:08 +01:00
|
|
|
name: Visual Studio
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2020-10-05 04:36:24 +02:00
|
|
|
# The type of runner that the job will run on
|
2022-07-13 00:37:15 +02:00
|
|
|
runs-on: windows-2022
|
2020-10-05 04:36:24 +02:00
|
|
|
|
|
|
|
# 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
|
2022-10-24 16:26:49 +02:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-19 03:22:56 +02:00
|
|
|
|
|
|
|
- name: Fetch Git tags
|
|
|
|
shell: cmd
|
|
|
|
run: git fetch --prune --unshallow --tags
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2021-08-13 23:52:26 +02:00
|
|
|
- name: Initialize build environment
|
2020-10-05 04:36:24 +02:00
|
|
|
shell: cmd
|
2021-08-08 19:15:44 +02:00
|
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
2020-10-05 04:36:24 +02:00
|
|
|
|
|
|
|
# Runs a single command using the runners shell
|
|
|
|
- name: Build
|
|
|
|
shell: cmd
|
2021-08-08 19:15:44 +02:00
|
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
|
|
|
|
2021-08-13 23:52:26 +02:00
|
|
|
- name: Prepare files for packaging
|
2020-10-05 04:36:24 +02:00
|
|
|
shell: powershell
|
2023-02-09 21:14:10 +01:00
|
|
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 PackageArtifacts
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2023-02-09 21:14:10 +01:00
|
|
|
# upload to "actions" tab artifacts (can only make a single .zip from a dir's files)
|
2023-02-12 00:10:49 +01:00
|
|
|
- name: Upload foobar2000 component artifact
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-05 04:36:24 +02:00
|
|
|
with:
|
|
|
|
name: foo_input_vgmstream.fb2k-component
|
2023-02-12 00:10:49 +01:00
|
|
|
path: ${{github.workspace}}\bin\artifacts\foobar2000
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2023-02-09 21:14:10 +01:00
|
|
|
- name: Upload CLI tools 32-bit artifact
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-05 04:36:24 +02:00
|
|
|
with:
|
2021-08-13 23:52:26 +02:00
|
|
|
name: vgmstream-win
|
2023-02-09 21:14:10 +01:00
|
|
|
path: ${{github.workspace}}\bin\artifacts\cli-x32
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2023-02-09 21:14:10 +01:00
|
|
|
- name: Upload CLI tools 64-bit artifact
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-05 04:36:24 +02:00
|
|
|
with:
|
2023-02-09 21:14:10 +01:00
|
|
|
name: vgmstream-win64
|
|
|
|
path: ${{github.workspace}}\bin\artifacts\cli-x64
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2023-02-12 00:10:49 +01:00
|
|
|
- name: debug symbols artifact (all)
|
2022-10-24 16:26:49 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-05 04:36:24 +02:00
|
|
|
with:
|
2023-02-12 00:10:49 +01:00
|
|
|
name: debug-symbols-pdb
|
|
|
|
path: ${{github.workspace}}\bin\artifacts\pdb
|
2021-08-08 19:15:44 +02:00
|
|
|
|
2023-01-29 21:12:45 +01:00
|
|
|
# uploads current assets to vgmstream-releases (token only works on merges)
|
|
|
|
- name: Upload artifacts to vgmstream-releases
|
2020-12-19 02:40:19 +01:00
|
|
|
if: github.event_name != 'pull_request'
|
2023-02-17 01:02:29 +01:00
|
|
|
shell: cmd
|
2023-02-18 17:09:07 +01:00
|
|
|
working-directory: ${{github.workspace}}
|
2020-10-05 05:54:45 +02:00
|
|
|
env:
|
2023-01-29 19:07:05 +01:00
|
|
|
UPLOADER_GITHUB_TOKEN: ${{ secrets.UPLOADER_GITHUB_TOKEN }}
|
2020-10-05 05:54:45 +02:00
|
|
|
run: |
|
2023-02-18 17:09:07 +01:00
|
|
|
python .github\uploader.py bin\vgmstream-win.zip bin\vgmstream-win64.zip bin\foo_input_vgmstream.fb2k-component
|
|
|
|
python .github\uploader.py --changelog
|
2023-01-29 19:07:05 +01:00
|
|
|
|
|
|
|
#- 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
|