create-new-release.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Create new release
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. new_version:
  6. description: 'New version'
  7. required: true
  8. type: string
  9. ref:
  10. description: 'Commit hash (optional)'
  11. required: false
  12. default: ''
  13. type: string
  14. jobs:
  15. test-new-version:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Verify new version format
  19. run: |
  20. if [[ "${{ inputs.new_version }}" =~ ^(\d+)\.(\d+)\.(\d+)$ ]];
  21. then
  22. echo "New version looks okay";
  23. exit 1
  24. else
  25. echo "Invalid version format";
  26. fi
  27. build:
  28. runs-on: ubuntu-latest
  29. steps:
  30. - uses: actions/checkout@v3
  31. with:
  32. ref: "${{inputs.ref}}"
  33. fetch-depth: 0
  34. submodules: 'recursive'
  35. - name: Build
  36. run: ./build.ps1
  37. shell: pwsh
  38. - uses: ncipollo/release-action@v1.12.0
  39. with:
  40. artifacts: "build/*.fap"
  41. bodyFile: ".github/release-body.md"
  42. artifactErrorsFailBuild: true
  43. updateOnlyUnreleased: true
  44. allowUpdates: true
  45. removeArtifacts: true
  46. draft: true
  47. tag: "v${{ inputs.new_version }}"
  48. commit: "${{inputs.ref}}"