build-package.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. when:
  3. - event: [pull_request, tag]
  4. - event: [push, manual]
  5. branch:
  6. - ${CI_REPO_DEFAULT_BRANCH}
  7. steps:
  8. - name: assets
  9. image: docker.io/library/node:lts
  10. commands:
  11. - npm install --quiet --no-progress
  12. - npm run build
  13. - cat VERSION
  14. environment:
  15. FORCE_COLOR: "true"
  16. - name: package
  17. image: docker.io/library/node:lts
  18. commands:
  19. - npm run pack
  20. environment:
  21. FORCE_COLOR: "true"
  22. - name: checksum
  23. image: quay.io/thegeeklab/alpine-tools
  24. commands:
  25. - cd dist/ && sha256sum * > ../sha256sum.txt
  26. - name: changelog
  27. image: quay.io/thegeeklab/git-sv
  28. commands:
  29. - git sv current-version
  30. - git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
  31. - cat CHANGELOG.md
  32. - name: publish-github
  33. image: docker.io/plugins/github-release
  34. settings:
  35. api_key:
  36. from_secret: github_token
  37. files:
  38. - dist/*
  39. - sha256sum.txt
  40. note: CHANGELOG.md
  41. overwrite: true
  42. title: ${CI_COMMIT_TAG}
  43. when:
  44. - event: [tag]
  45. depends_on:
  46. - test