Skip to content

Commit

Permalink
fix publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
kira1928 committed Jun 18, 2024
1 parent 955121b commit bf5a689
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,33 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ffmpeg-${{ matrix.target }}
path: ./ffmpeg*
path: |
./ffmpeg
./ffmpeg.exe
if-no-files-found: error

publish_release:
name: Publish release
if: ${{ !cancelled() && github.event.inputs.doRelease == 'true' && needs.build.result == 'success' }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download FFmpeg artifacts
uses: actions/download-artifact@v4
with:
pattern: ffmpeg*
merge-multiple: true
merge-multiple: false
path: artifacts

- name: Zip artifacts
run: |
for dir in artifacts/*; do
zip -j -r "${dir##*/}.zip" "$dir"
done
- name: Create release
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -104,5 +116,5 @@ jobs:
RELDATE=$(date +'%Y-%m-%d %H:%M:%S')
RELEASE_NAME="FFmpeg $RELDATE"
TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M-%S')"
gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/*
gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/*.zip

0 comments on commit bf5a689

Please sign in to comment.