Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

release.yml 2.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: Release Application
  2. on:
  3. push:
  4. tags: ['v*']
  5. jobs:
  6. release:
  7. name: Create release
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout code
  11. uses: actions/checkout@v2
  12. - name: Setup
  13. run: |
  14. sudo apt update
  15. sudo apt install ruby
  16. sudo gem install ronn
  17. - name: Prepare release
  18. id: prepare_release
  19. run: |
  20. changelog="$(git diff HEAD^ HEAD -- CHANGELOG.md | grep -E '\+[#*]' | sed 's/^+//')"
  21. changelog="${changelog//$'%'/'%25'}"
  22. changelog="${changelog//$'\n'/'%0A'}"
  23. changelog="${changelog//$'\r'/'%0D'}"
  24. echo "::set-output name=changelog::$changelog"
  25. - name: Create release
  26. id: create_release
  27. uses: actions/create-release@v1
  28. env:
  29. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  30. with:
  31. tag_name: ${{ github.ref }}
  32. release_name: Version ${{ github.ref }}
  33. draft: true
  34. prerelease: false
  35. body: |
  36. ${{ steps.prepare_release.outputs.changelog }}
  37. pipy:
  38. name: Release to PyPI
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v1
  42. - name: Set up Python
  43. uses: actions/setup-python@v1
  44. with:
  45. python-version: '3.7'
  46. - name: Setup environment
  47. run: |
  48. sudo apt update
  49. sudo apt install ruby
  50. sudo gem install ronn
  51. - name: Install dependencies
  52. run: |
  53. python -m pip install --upgrade pip
  54. pip install setuptools wheel twine skyfield numpy tabulate Babel requests
  55. - name: Build and publish
  56. env:
  57. TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
  58. TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
  59. run: |
  60. make i18n build
  61. twine upload dist/*