diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..1ccd95a1 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,43 @@ +name: Release Tasks +on: + release: + types: [published] + +jobs: + docs: + name: Publish Documentation + runs-on: ubuntu-20.04 + continue-on-error: false + if: github.repository == 'fedora-modularity/libmodulemd' + steps: + - name: Checkout code repo + uses: actions/checkout@v2 + + - name: Checkout documentation repo + uses: actions/checkout@v2 + with: + repository: fedora-modularity/fedora-modularity.github.io + ref: main + path: fedora-modularity.github.io + token: ${{ secrets.DOC_TOKEN }} + + - name: Get release version + run: | + echo "version=$(./get_version.sh)" >> $GITHUB_ENV + + - name: Generate documentation + run: | + ./.ci/ci-docs.sh $version + + - name: Commit documentation + uses: EndBug/add-and-commit@v6 + with: + branch: main + token: ${{ secrets.DOC_TOKEN }} + cwd: fedora-modularity.github.io + author_name: Libmodulemd CI + author_email: github-actions@github.com + message: libmodulemd docs for ${{ env.version }} + add: libmodulemd/${{ env.version }} + signoff: true + push: true