Skip to content

Functional changes for optional update UI #140

Functional changes for optional update UI

Functional changes for optional update UI #140

Workflow file for this run

name: build
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
on:
push:
paths-ignore:
- '**.md'
branches: [ "master" ]
tags:
- '*'
pull_request:
paths-ignore:
- '**.md'
branches: [ "master" ]
env:
RELEASE_BUCKET: "obs-studio-deployment"
DEPS_LOCAL_PATH: ${{github.workspace}}/build/deps
permissions:
contents: read
jobs:
build:
name: 'Build a package'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Get the version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Download binary deps
run: ./ci/download_deps.bat
- name: Download gettext binaries
run: ./ci/localization_prepare_binaries.cmd
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Configure
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake -H"${{ github.workspace }}" -B"build" -G"Visual Studio 17 2022" ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64 ^
-DCMAKE_DEPS_DIR=${{env.DEPS_LOCAL_PATH}} ^
-DCMAKE_INSTALL_PREFIX="build/distribute/a-file-updater"
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.VERSION }}
- name: Build
run: cmake --build "build" --target install --config RelWithDebInfo
- name: Cache build
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-build-${{ github.sha }}
upload_debug_symbols:
needs: build
name: 'Upload debug symbols'
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Get build from cache
id: cache-check
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Check cache
if: steps.cache-check.outputs.cache-hit != 'true'
run: exit 1
- name: Fetch symsrv-scripts
uses: actions/checkout@v3
with:
fetch-depth: 2
repository: stream-labs/symsrv-scripts
path: symsrv-scripts
- name: Run symbol server scripts
run: ./symsrv-scripts/main.bat "${{ github.workspace }}/symsrv-scripts" ".\main.ps1 -localSourceDir '${{ github.workspace }}' -repo_userId 'stream-labs' -repo_name 'slobs_updater' -repo_branch '${{ github.sha }}'"
env:
AWS_SYMB_ACCESS_KEY_ID: ${{secrets.AWS_SYMB_ACCESS_KEY_ID}}
AWS_SYMB_SECRET_ACCESS_KEY: ${{secrets.AWS_SYMB_SECRET_ACCESS_KEY}}
shell: powershell
upload_release_package:
needs: build
name: 'Upload release package'
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
- name: Get build from cache
id: cache-check
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Check cache
if: steps.cache-check.outputs.cache-hit != 'true'
run: exit 1
- name: Tar artifact for deployment
run: tar -cvzf ${{env.TARGET_ARTIFACT}}.tar.gz -C ${{env.INSTALL_DISTRIBUTE_PATH}} a-file-updater
env:
TARGET_ARTIFACT: slobs_updater-${{ steps.get_version.outputs.VERSION }}-win64
INSTALL_DISTRIBUTE_PATH: "build/distribute"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}}
aws-secret-access-key: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}}
aws-region: us-west-2
- name: Deploy
run: aws s3 cp ${{env.TARGET_ARTIFACT}}.tar.gz s3://${{env.RELEASE_BUCKET}} --acl public-read
env:
TARGET_ARTIFACT: slobs_updater-${{ steps.get_version.outputs.VERSION }}-win64