release.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Release
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. version:
  6. description: 'npm version. Examples: "2.0.0", "2.0.0-beta.0". To deploy an experimental version, type "experimental".'
  7. default: "experimental"
  8. required: true
  9. dry-run:
  10. description: "Only create a tarball, do not publish to npm or create a release on GitHub."
  11. type: boolean
  12. default: true
  13. required: true
  14. jobs:
  15. test:
  16. uses: ./.github/workflows/_test.yml
  17. release:
  18. runs-on: ubuntu-latest
  19. needs: test
  20. steps:
  21. - name: Git checkout
  22. uses: actions/checkout@v4
  23. - name: Use Node.js
  24. uses: actions/setup-node@v4
  25. with:
  26. node-version: 20
  27. - run: npm ci
  28. - run: ./scripts/release.js --version ${{ github.event.inputs.version }} ${{ github.event.inputs.dry-run == 'true' && '--dry-run' || '' }}
  29. env:
  30. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  31. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  32. - name: Archive npm package tarball
  33. uses: actions/upload-artifact@v3
  34. with:
  35. name: npm
  36. path: |
  37. packages/quill/dist/*.tgz