forked from vgmstream/vgmstream
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (77 loc) · 3.72 KB
/
vs-win.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# 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@v4
- 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 PackageArtifacts
# upload to "actions" tab artifacts (can only make a single .zip from a dir's files)
- name: Upload foobar2000 component artifact
uses: actions/upload-artifact@v4
with:
name: foo_input_vgmstream.fb2k-component
path: ${{github.workspace}}\bin\artifacts\foobar2000
- name: Upload CLI tools 32-bit artifact
uses: actions/upload-artifact@v4
with:
name: vgmstream-win
path: ${{github.workspace}}\bin\artifacts\cli-x32
- name: Upload CLI tools 64-bit artifact
uses: actions/upload-artifact@v4
with:
name: vgmstream-win64
path: ${{github.workspace}}\bin\artifacts\cli-x64
- name: debug symbols artifact (all)
uses: actions/upload-artifact@v4
with:
name: debug-symbols-pdb
path: ${{github.workspace}}\bin\artifacts\pdb
# uploads current assets to vgmstream-releases (token only works on merges)
- name: Upload artifacts to vgmstream-releases
if: github.event_name != 'pull_request'
shell: cmd
working-directory: ${{github.workspace}}
env:
UPLOADER_GITHUB_TOKEN: ${{ secrets.UPLOADER_GITHUB_TOKEN }}
run: |
python .github\uploader.py bin\vgmstream-win.zip bin\vgmstream-win64.zip bin\foo_input_vgmstream.fb2k-component
python .github\uploader.py --changelog
#- 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