BUILD #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}' |