release.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. permissions:
  15. contents: write
  16. jobs:
  17. test:
  18. uses: ./.github/workflows/_test.yml
  19. release:
  20. runs-on: ubuntu-latest
  21. needs: test
  22. steps:
  23. - name: Git checkout
  24. uses: actions/checkout@v4
  25. - name: Use Node.js
  26. uses: actions/setup-node@v4
  27. with:
  28. node-version: 20
  29. - run: npm ci
  30. - run: ./scripts/release.js --version ${{ github.event.inputs.version }} ${{ github.event.inputs.dry-run == 'true' && '--dry-run' || '' }}
  31. env:
  32. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  33. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  34. - name: Archive npm package tarball
  35. uses: actions/upload-artifact@v3
  36. with:
  37. name: npm
  38. path: |
  39. packages/quill/dist/*.tgz