publish.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Release a number of things
  2. # - the extension
  3. # - the CLI
  4. # - nightly docs
  5. # - the website
  6. # - crates themselves
  7. name: Publish to crates.io
  8. on:
  9. workflow_dispatch:
  10. inputs:
  11. semver:
  12. type: choice
  13. description: "Semver version to publish"
  14. required: true
  15. options:
  16. - patch
  17. - minor
  18. - major
  19. jobs:
  20. publish:
  21. runs-on: ubuntu-latest
  22. steps:
  23. - name: Checkout code
  24. uses: actions/checkout@v2
  25. - name: Set up Rust
  26. uses: actions-rs/toolchain@v1
  27. with:
  28. toolchain: nightly
  29. override: true
  30. - name: Install cargo-workspaces
  31. run: cargo install cargo-workspaces
  32. - name: Login to crates.io
  33. uses: actions-rs/cargo@v1
  34. with:
  35. toolchain: nightly
  36. command: login
  37. args: ${{ secrets.CRATES_TOKEN }}
  38. - name: Publish to crates.io
  39. run: |
  40. git config --global user.email "github-actions[bot]@users.noreply.github.com"
  41. git config --global user.name "github-actions[bot]"
  42. # Release as-is
  43. # This assumes the version tracking PR has been merged
  44. # cargo workspaces changed
  45. # # version will automatically commit back to the repo
  46. # # cargo workspaces version -y ${{ github.event.inputs.semver }}
  47. # # publish will automatically commit back to the repo **AND** publish to crates.io
  48. # # cargo workspaces publish -y ${{ github.event.inputs.semver }}