Release 1.5.0 #99
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-2022 | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
matrix: | |
configuration: ['Release', 'Debug'] | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Set up MSBuild | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Set repo variable | |
run: | | |
$repo = "${{ github.repository }}".Split("/")[1] | |
echo "REPO=$repo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Build Win32 | |
run: msbuild /m '/p:Platform=Win32;Configuration=${{ matrix.configuration }}' src\${{ env.REPO }}.sln | |
- name: Build x64 | |
run: msbuild /m '/p:Platform=x64;Configuration=${{ matrix.configuration }}' src\${{ env.REPO }}.sln | |
- name: Copy licenses | |
run: | | |
$LICENSE_DIR="component/licenses" | |
mkdir -Force "$LICENSE_DIR" | |
copy LICENSE.txt "$LICENSE_DIR\foo_listenbrainz2-license.txt" | |
copy foobar2000-sdk\sdk-license.txt "$LICENSE_DIR\foobar2000-sdk-license.txt" | |
copy foobar2000-sdk\libPPUI\libPPUI-license.txt "$LICENSE_DIR\libPPUI-license.txt" | |
copy foobar2000-sdk\nlohmann\LICENSE.MIT "$LICENSE_DIR\JSON-for-modern-C++-license.txt" | |
copy foobar2000-sdk\pfc\pfc-license.txt "$LICENSE_DIR\pfc-license.txt" | |
copy foobar2000-sdk\wtl\MS-PL.txt "$LICENSE_DIR\wtl-license.txt" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.REPO }}-${{ matrix.configuration }} | |
path: component/ | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- build | |
steps: | |
- name: Set repo and version variable | |
run: | | |
echo "REPO=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- uses: actions/download-artifact@v1 | |
with: | |
name: ${{ env.REPO }}-Release | |
path: artifacts/${{ env.REPO }}/ | |
- name: Generate fb2k component package | |
run: | | |
mkdir artifacts/release/ | |
cd artifacts/${{ env.REPO }}/ | |
rm *.pdb | |
rm x64/*.pdb | |
zip -r ../release/${{ env.REPO }}-$VERSION.fb2k-component * | |
- name: Generate checksums | |
run: | | |
cd artifacts/release/ | |
sha256sum * > SHA256SUMS | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: artifacts/release/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |