Skip to content

BUILD

BUILD #48

Workflow file for this run

name: 'BUILD'
on:
workflow_dispatch:
inputs:
tag:
required: true
jobs:
source_build:
name: 'Source'
runs-on: [ubuntu-22.04]
permissions:
contents: write
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Create source artifact'
run: |
git tag ${{ github.event.inputs.tag }}
git push origin --tags
mkdir /tmp/build && cd /tmp/build
git clone https://github.com/obsproject/obs-studio.git
mv obs-studio obs-studio-${{ github.event.inputs.tag }}
git -C obs-studio-${{ github.event.inputs.tag }} checkout tags/${{ github.event.inputs.tag }}
git -C obs-studio-${{ github.event.inputs.tag }} submodule update --init --recursive
ARTIFACT_NAME=obs-studio-${{ github.event.inputs.tag }}.tar.gz
echo "artifact: $ARTIFACT_NAME"
# create a tarball with *all* the sources
# - prefix paths with 'obs-studio/' (since we are creating the tarball from within the source dir)
# - exclude all repository files
# - make the tarball reproducible
tar -cvzf /tmp/${ARTIFACT_NAME} --exclude-vcs --exclude-vcs-ignores --exclude '.git*' --sort=name --owner=0 --group=0 --numeric-owner --pax-option="exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime" --mtime="${commit_date}" .
echo "FILE_NAME=/tmp/${ARTIFACT_NAME}" >> $GITHUB_ENV
- name: 'Release'
uses: softprops/action-gh-release@v1
with:
files: '${{ env.FILE_NAME }}'
tag_name: '${{ github.event.inputs.tag }}'