Skip to content

Commit

Permalink
Update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cg2121 committed May 1, 2021
1 parent 0397906 commit 7d79bc3
Showing 1 changed file with 48 additions and 16 deletions.
64 changes: 48 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ env:
MACOS_SIGN_PLUGIN: false
OBS_VERSION: "26.1.2"
QT_VERSION: "5.15.2"
PLUGIN_NAME: "obs-decklink-output-filter"
PLUGIN_VERSION: "1.0.0"
MACOS_BUNDLEID: "com.obs-plugin.decklink-output-filter"

jobs:
ubuntu64:
Expand All @@ -25,6 +24,12 @@ jobs:
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: 'Fetch git info'
shell: bash
run: |
git fetch --prune --unshallow
echo "PLUGIN_NAME=$(basename `git rev-parse --show-toplevel`)" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Install dependencies
if: success()
shell: bash
Expand Down Expand Up @@ -70,19 +75,18 @@ jobs:
uses: actions/[email protected]
with:
name: 'ubuntu-artifact'
path: './package'
path: './package/*.deb'
macos64:
name: 'macOS 64-bit'
runs-on: [macos-latest]
env:
MACOS_DEPS_VERSION: "2021-03-25"
MIN_MACOS_VERSION: '10.13'
MACOS_BUNDLEID: "com.obs-plugin.decklink-output-filter"
CODE_SIGNING_IDENTITY: ${{ secrets.macOScodeSigningIdentity }}
INSTALLER_SIGNING_IDENTITY: ${{ secrets.macOSinstallerSigningIdentity }}
AC_USERNAME: ${{ secrets.macOSnotarizationusername }}
AC_PASSWORD: ${{ secrets.macOSnotarizationpassword }}
AC_PROVIDER_SHORTNAME: ${{ secrets.macOSnotarizationproviderShortName }}
CODE_SIGNING_IDENTITY: ${{ secrets.MACOS_CODE_SIGNING_IDENTITY }}
INSTALLER_SIGNING_IDENTITY: ${{ secrets.MACOS_INSTALLER_SIGNING_IDENTITY }}
AC_USERNAME: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
AC_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
AC_PROVIDER_SHORTNAME: ${{ secrets.MACOS_NOTARIZATION_PROVIDER_SHORTNAME }}
steps:
- name: Get current setup
shell: bash
Expand All @@ -94,6 +98,12 @@ jobs:
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: 'Fetch git info'
shell: bash
run: |
git fetch --prune --unshallow
echo "PLUGIN_NAME=$(basename `git rev-parse --show-toplevel`)" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: 'Install prerequisite: Pre-built dependencies'
if: steps.deps-cache.outputs.cache-hit != 'true'
shell: bash
Expand Down Expand Up @@ -140,7 +150,7 @@ jobs:
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
with:
p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
p12-password: ${{ secrets.macOScertificatesImportPassword }}
p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
- name: Preparing plugin for packaging
if: success()
shell: bash
Expand Down Expand Up @@ -237,6 +247,12 @@ jobs:
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: 'Fetch git info'
shell: bash
run: |
git fetch --prune --unshallow
echo "PLUGIN_NAME=$(basename `git rev-parse --show-toplevel`)" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: 'Restore QT dependency from cache'
id: qt-cache
uses: actions/[email protected]
Expand Down Expand Up @@ -309,18 +325,34 @@ jobs:
cd package
7z a "${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-win64.zip" "${{ github.workspace }}/release/*"
iscc ${{ github.workspace }}/installer/installer-Windows.generated.iss /O. /F"${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-windows-installer"
- name: 'Publish artifact'
- name: 'Publish installer artifact'
if: success()
uses: actions/[email protected]
with:
name: 'windows-artifact'
path: './package'
name: 'windows-installer-artifact'
path: './package/*.exe'
- name: 'Publish zip artifact'
if: success()
uses: actions/[email protected]
with:
name: 'windows-zip-artifact'
path: './package/*.zip'
make-release:
name: 'Create and upload release'
runs-on: [ubuntu-latest]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [win64, macos64, ubuntu64]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: 'Fetch git info'
shell: bash
run: |
git fetch --prune --unshallow
echo "PLUGIN_NAME=$(basename `git rev-parse --show-toplevel`)" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: 'Create Release'
id: create_release
uses: actions/create-release@v1
Expand All @@ -330,7 +362,7 @@ jobs:
tag_name: ${{ env.PLUGIN_VERSION }}
release_name: OBS Decklink Output Filter ${{ env.PLUGIN_VERSION }}
draft: false
prerelease: false
prerelease: ${{ contains(env.PLUGIN_VERSION, 'rc') }}
- name: 'Download release artifacts'
uses: actions/download-artifact@v2-preview
- name: 'Upload win64 to release'
Expand All @@ -339,7 +371,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/windows-artifact/${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-windows-installer.exe
asset_path: ${{ github.workspace }}/windows-installer-artifact/${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-windows-installer.exe
asset_name: ${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-win64-installer.exe
asset_content_type: application/octet-stream
- name: 'Upload win64 zip to release'
Expand All @@ -348,7 +380,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/windows-artifact/${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-win64.zip
asset_path: ${{ github.workspace }}/windows-zip-artifact/${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-win64.zip
asset_name: ${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-win64.zip
asset_content_type: application/octet-stream
- name: 'Upload macOS to release'
Expand Down

0 comments on commit 7d79bc3

Please sign in to comment.