diff --git a/.github/containers/fedora36/Dockerfile b/.github/containers/fedora-template/Dockerfile similarity index 95% rename from .github/containers/fedora36/Dockerfile rename to .github/containers/fedora-template/Dockerfile index 2dafd71..ef01545 100644 --- a/.github/containers/fedora36/Dockerfile +++ b/.github/containers/fedora-template/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:36 +FROM fedora:%releasever% RUN dnf install -y rpm-build python3-dnf-plugins-core && dnf clean all diff --git a/.github/containers/fedora-template/build.sh b/.github/containers/fedora-template/build.sh new file mode 100755 index 0000000..23d89d4 --- /dev/null +++ b/.github/containers/fedora-template/build.sh @@ -0,0 +1,4 @@ +#! /bin/bash +set -ex +.github/containers/fedora-common/build.sh obs-plugin-build/fedora%releasever% fedora%releasever%-rpmbuild +echo 'FILE_NAME=fedora%releasever%-rpmbuild/*RPMS/**/*.rpm' >> $GITHUB_ENV diff --git a/.github/containers/fedora36/build.sh b/.github/containers/fedora36/build.sh deleted file mode 100755 index 4238230..0000000 --- a/.github/containers/fedora36/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/bash -set -ex -.github/containers/fedora-common/build.sh obs-plugin-build/fedora36 fedora36-rpmbuild -echo 'FILE_NAME=fedora36-rpmbuild/*RPMS/**/*.rpm' >> $GITHUB_ENV diff --git a/.github/containers/fedora37/Dockerfile b/.github/containers/fedora37/Dockerfile deleted file mode 100644 index 84bc39b..0000000 --- a/.github/containers/fedora37/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM fedora:37 - -RUN dnf install -y rpm-build python3-dnf-plugins-core && dnf clean all - -# https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/ -RUN dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm && dnf clean all -RUN dnf install -y obs-studio obs-studio-devel && dnf clean all - -RUN useradd -s /bin/bash -m rpm -RUN echo >> /etc/sudoers -RUN echo "rpm ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers - -USER rpm -WORKDIR /home/rpm diff --git a/.github/containers/fedora37/build.sh b/.github/containers/fedora37/build.sh deleted file mode 100755 index 018b3c5..0000000 --- a/.github/containers/fedora37/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/bash -set -ex -.github/containers/fedora-common/build.sh obs-plugin-build/fedora37 fedora37-rpmbuild -echo 'FILE_NAME=fedora37-rpmbuild/*RPMS/**/*.rpm' >> $GITHUB_ENV diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index aa0878a..b25c7db 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Clang run: | diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index a1503aa..a3845f0 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -24,8 +24,8 @@ jobs: fail-fast: false matrix: target: - - fedora36 - - fedora37 + - fedora38 + - fedora39 defaults: run: shell: bash @@ -34,14 +34,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 submodules: recursive + - name: Generate container directory + run: | + cp -a .github/containers/fedora-template .github/containers/$target + releasever="$(cut -b 7- <<< "$target")" + sed -i "s/%releasever%/$releasever/g" .github/containers/$target/* + - name: Restore docker from cache id: docker-cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ${{ github.workspace }}/docker-cache key: docker-cache-${{ matrix.target }}-${{ hashFiles(format('.github/containers/{0}/Dockerfile', matrix.target)) }} @@ -54,7 +60,7 @@ jobs: docker save obs-plugin-build/$target | gzip > docker-cache/obs-plugin-build-$target.tar.gz - name: Save docker to cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: ${{ steps.docker-cache.outputs.cache-hit != 'true' }} with: path: ${{ github.workspace }}/docker-cache @@ -69,7 +75,7 @@ jobs: run: .github/containers/$target/build.sh - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.artifactName }} + name: ${{ env.artifactName }}-${{ matrix.target }} path: '${{ env.FILE_NAME }}' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index efcc183..575c118 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -73,9 +73,9 @@ jobs: make package echo "FILE_NAME=$(find $PWD -name '*.deb' | head -n 1)" >> $GITHUB_ENV - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.artifactName }} + name: ${{ env.artifactName }}-linux-obs${{ matrix.obs }}-${{ matrix.ubuntu }} path: '${{ env.FILE_NAME }}' - name: Check package run: | @@ -108,7 +108,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -120,28 +120,28 @@ jobs: if [[ '${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}' != '' && \ '${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}' != '' && \ '${{ secrets.MACOS_SIGNING_CERT }}' != '' ]]; then - echo '::set-output name=haveCodesignIdent::true' + echo "haveCodesignIdent=true" >> $GITHUB_OUTPUT else - echo '::set-output name=haveCodesignIdent::false' + echo "haveCodesignIdent=false" >> $GITHUB_OUTPUT fi if [[ '${{ secrets.MACOS_NOTARIZATION_USERNAME }}' != '' && \ '${{ secrets.MACOS_NOTARIZATION_PASSWORD }}' != '' ]]; then - echo '::set-output name=haveNotarizationUser::true' + echo "haveNotarizationUser=true" >> $GITHUB_OUTPUT else - echo '::set-output name=haveNotarizationUser::false' + echo "haveNotarizationUser=false" >> $GITHUB_OUTPUT fi echo '::endgroup::' - name: Install Apple Developer Certificate if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }} - uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071 + uses: apple-actions/import-codesign-certs@v2 with: keychain-password: ${{ github.run_id }} p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }} p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }} - name: Set Signing Identity - if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }} + if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' && steps.setup.outputs.haveNotarizationUser == 'true' }} run: | set -e TEAM_ID=$(echo "${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}" | sed 's/.*(\([A-Za-z0-9]*\))$/\1/') @@ -267,9 +267,9 @@ jobs: verbose: true - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.artifactName }} + name: ${{ env.artifactName }}-macos-obs${{ matrix.obs }}-${{ matrix.arch }} path: package/* windows_build: @@ -287,7 +287,7 @@ jobs: shell: pwsh steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Download obs-studio @@ -312,7 +312,7 @@ jobs: - name: Package plugin run: ci/windows/package-windows.cmd ${{ matrix.obs }} - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.artifactName }} + name: ${{ env.artifactName }}-windows-obs${{ matrix.obs }}-${{ matrix.arch }} path: package/*