publish_and_install.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Publish & Install
  2. # Temporarily disabled this workflow because the last step (installing from Verdaccio) is flaky and
  3. # randomly failing despite numerous attempts to stabilize. Therefore this is not useful at
  4. # the moment.
  5. # on:
  6. # push:
  7. # branches:
  8. # - master
  9. # pull_request:
  10. # branches:
  11. # - master
  12. on:
  13. deployment
  14. jobs:
  15. publish_install:
  16. runs-on: ${{ matrix.os }}
  17. strategy:
  18. matrix:
  19. os: [ubuntu-latest, macOS-latest]
  20. node-version: [10.x, 12.x]
  21. steps:
  22. - uses: actions/checkout@v1
  23. - name: Use Node.js ${{ matrix.node-version }}
  24. uses: actions/setup-node@v1
  25. with:
  26. node-version: ${{ matrix.node-version }}
  27. - name: Install & bootstrap
  28. run: |
  29. yarn install
  30. yarn bootstrap
  31. env:
  32. CI: true
  33. - name: Install Verdaccio
  34. run: |
  35. npm install -g verdaccio
  36. mkdir -p $HOME/.config/verdaccio
  37. cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml
  38. verdaccio --config $HOME/.config/verdaccio/config.yaml &
  39. - name: Publish to Verdaccio
  40. run: |
  41. npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
  42. npm set //localhost:4873/:_authToken=${{ secrets.VERDACCIO_AUTH_TOKEN }}
  43. npm set registry=http://localhost:4873/
  44. yarn lerna publish prepatch --preid ci --no-push --no-git-tag-version --no-commit-hooks --force-publish "*" --yes --dist-tag ci --registry http://localhost:4873/
  45. - name: Install via @vendure/create
  46. run: |
  47. mkdir -p $HOME/install
  48. cd $HOME/install
  49. npm dist-tag ls @vendure/create
  50. npx @vendure/create@ci test-app --ci --use-npm