tagadd.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Release build
  2. on:
  3. push:
  4. branches:
  5. - ci_check
  6. tags:
  7. - 'v*'
  8. jobs:
  9. build-deb:
  10. name: Build release packages
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Build the Ubuntu Latest Docker image
  15. id: build_release
  16. run: |
  17. docker build . --file .ci/Dockerfile.ubuntu_deb --tag ubuntu_debimage:latest
  18. mkdir artifacts
  19. docker run --mount type=bind,source="$(pwd)"/artifacts,target=/artifacts ubuntu_debimage:latest sh -c "mv /build/*.deb /artifacts"
  20. ls artifacts/*
  21. cd artifacts
  22. echo "##[set-output name=libpackage;]$(ls -1 libqtprotobuf_*.deb)"
  23. echo "##[set-output name=devpackage;]$(ls -1 libqtprotobuf-dev_*.deb)"
  24. - name: Create Release
  25. id: create_release
  26. uses: actions/create-release@v1
  27. env:
  28. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  29. with:
  30. tag_name: ${{ github.ref }}
  31. release_name: Release ${{ github.ref }}
  32. draft: false
  33. prerelease: false
  34. - name: Upload release lib package
  35. id: upload_lib
  36. uses: actions/upload-release-asset@v1
  37. env:
  38. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  39. with:
  40. upload_url: ${{ steps.create_release.outputs.upload_url }}
  41. asset_path: artifacts/${{ steps.build_release.outputs.libpackage }}
  42. asset_name: ${{ steps.build_release.outputs.libpackage }}
  43. asset_content_type: application/x-debian-package
  44. - name: Upload release dev package
  45. id: upload_dev
  46. uses: actions/upload-release-asset@v1
  47. env:
  48. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  49. with:
  50. upload_url: ${{ steps.create_release.outputs.upload_url }}
  51. asset_path: artifacts/${{ steps.build_release.outputs.devpackage }}
  52. asset_name: ${{ steps.build_release.outputs.devpackage }}
  53. asset_content_type: application/x-debian-package