Skip to content

Commit

Permalink
CI: Auto upload mac releases to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
cg2121 committed Mar 28, 2022
1 parent bc2192d commit 4e8de11
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,3 +495,37 @@ jobs:
with:
name: 'obs-macos-${{ matrix.arch }}-notarized'
path: '${{ github.workspace }}/${{ env.FILE_NAME }}'

make_release:
name: 'Create and upload release'
runs-on: [ubuntu-latest]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [macos_release]
steps:
- name: Get Metadata
id: metadata
run: |
echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
- name: Download build artifacts
uses: actions/download-artifact@v3

- name: Generate Checksums
run: |
shopt -s extglob
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
for file in ${{ github.workspace }}/**/@(*.dmg|*.exe|*.deb|*.zip); do
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
done
- name: 'Create Release'
id: create_release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
with:
draft: true
prerelease: ${{ contains(steps.metadata.outputs.version, 'rc') }}
tag_name: ${{ steps.metadata.outputs.version }}
name: "OBS Studio ${{ steps.metadata.outputs.version }}"
body_path: ${{ github.workspace }}/CHECKSUMS.txt
files: |
${{ github.workspace }}/*.dmg

0 comments on commit 4e8de11

Please sign in to comment.