release.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: GitHub Release
  2. on:
  3. push:
  4. branches:
  5. - release/**
  6. jobs:
  7. release:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v1
  11. with:
  12. fetch-depth: 1
  13. - name: Init Git
  14. run: |
  15. git config --local user.name "GitHub Action"
  16. git config --local user.email "info@weseek.co.jp"
  17. - name: Bump version
  18. run: |
  19. npm --no-git-tag-version version patch
  20. export RELEASE_VERSION=`npm run version --silent`
  21. sh ./bin/github-actions/update-readme.sh
  22. echo ::set-env name=RELEASE_VERSION::$RELEASE_VERSION
  23. - name: Commit and Tag
  24. run: |
  25. git commit -am "Release v${{ env.RELEASE_VERSION }}"
  26. git tag v${{ env.RELEASE_VERSION }} HEAD
  27. - name: Push tag
  28. run: |
  29. TMP_RELEASE_BRANCH=tmp/release-${{ env.RELEASE_VERSION }}
  30. git push origin HEAD:$TMP_RELEASE_BRANCH --follow-tags
  31. git push --delete origin $TMP_RELEASE_BRANCH
  32. - name: Upload release notes
  33. uses: Roang-zero1/github-create-release-action@master
  34. with:
  35. created_tag: v${{ env.RELEASE_VERSION }}
  36. env:
  37. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}