Adding the ability to publish the documentation tar package.

This commit is contained in:
sr55 2022-10-27 19:57:40 +01:00
parent f45ae90db6
commit 4102620972
No known key found for this signature in database
GPG Key ID: ECE911849A3E21A5
2 changed files with 58 additions and 0 deletions

View File

@ -41,3 +41,52 @@ jobs:
with:
name: docs
path: public/
publish:
name: Publish Documentation
runs-on: ubuntu-latest
needs: build
if: github.repository == 'HandBrake/HandBrake-docs'
steps:
- uses: actions/checkout@v3
- name: Download Artifacts - Documentation
uses: actions/download-artifact@v3
with:
name: docs
path: docs/
# Generate Hashes
- name: Generate SHA265 Hashes
run: |
cd docs
sha256sum * > sha256.txt
cp sha256.txt ../.github/workflows/
cd ..
cd .github/workflows/
sed -e 's/ / | /' -i sha256.txt
sed -e 's/^/| /' -i sha256.txt
sed -e 's/$/ |/' -i sha256.txt
cat sha256.txt >> rel_body.md
# Publishing the Release
- name: Remove the old Release
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
keep_latest: 0
delete_tag_pattern: "docs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Release
uses: ncipollo/release-action@v1
with:
artifacts: "docs/*.*"
name: "Documentation"
bodyFile: .github/workflows/rel_body.md
prerelease: true
replacesArtifacts: false
allowUpdates: false
tag: lin
token: ${{ secrets.GITHUB_TOKEN }}

9
.github/workflows/rel_body.md vendored Normal file
View File

@ -0,0 +1,9 @@
### Documentation
The HandBrake Documentation should be viewed at: https://handbrake.fr/docs/
### File Information
| SHA256 | Filename |
|----------|--------|