Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github: Update github actions to v4 #36

Merged
merged 4 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:%releasever%

RUN dnf install -y rpm-build python3-dnf-plugins-core && dnf clean all

Expand Down
4 changes: 4 additions & 0 deletions .github/containers/fedora-template/build.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions .github/containers/fedora36/build.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .github/containers/fedora37/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions .github/containers/fedora37/build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Clang
run: |
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
fail-fast: false
matrix:
target:
- fedora36
- fedora37
- fedora38
- fedora39
defaults:
run:
shell: bash
Expand All @@ -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)) }}
Expand All @@ -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
Expand All @@ -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 }}'
30 changes: 15 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -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/')
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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/*
Loading