build-release.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Build & Release
  2. on:
  3. push:
  4. jobs:
  5. build:
  6. runs-on: ubuntu-18.04
  7. if: github.ref == 'refs/heads/release'
  8. steps:
  9. - name: Checkout reposistory
  10. uses: actions/checkout@v2
  11. with:
  12. ref: 'release'
  13. - name: Get Submodule
  14. run: |
  15. git submodule init
  16. git config submodule.src/main/webapp/resources.url https://${{secrets.I18N_USERNAME}}:${{secrets.I18N_ACCESS_KEY}}@github.com/jgraph/drawio-i18n.git
  17. git submodule update --init --recursive
  18. - name: Installing Node
  19. uses: actions/setup-node@v2
  20. with:
  21. node-version: 14
  22. - name: Build
  23. run: |
  24. cd etc/build
  25. npm install workbox-cli@6.3.0 --global
  26. ln -s `which workbox` /usr/local/bin/workbox
  27. ant
  28. - name: Tag and Push
  29. run: |
  30. export VERSION=`cat VERSION`
  31. git config user.name github-actions
  32. git config user.email github-actions@github.com
  33. git add .
  34. git commit -a -m "Ready for $VERSION"
  35. git push
  36. git tag "diagramly-${VERSION//\./_}"
  37. git push origin "diagramly-${VERSION//\./_}"