add a publish release step

This commit is contained in:
jonaswinkler 2021-01-10 22:22:23 +01:00
parent 296be9135a
commit a9d6e7f402

View File

@ -82,7 +82,7 @@ jobs:
name: frontend-compiled
path: src/documents/static/frontend/
release:
build-release:
needs: [frontend, documentation, tests]
runs-on: ubuntu-20.04
steps:
@ -143,6 +143,38 @@ jobs:
name: release
path: dist/paperless-ng.tar.xz
publish-release:
runs-on: ubuntu-latest
needs: build-release
steps:
-
name: Download Release Artifact
uses: actions/download-artifact@v2
with:
name: release
path: paperless-ng.tar.xz
-
name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Paperless-ng ${{ github.ref }}
draft: true
prerelease: true
-
name: Upload Release Archive
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./paperless-ng.tar.xz
asset_name: paperless-ng-${{ github.ref }}.tar.xz
asset_content_type: application/x-xz
# build and push image to docker hub.
build-docker-image: