name: GitHub Release on: push: branches: - release/** jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - name: Init Git run: | git config --local user.name "GitHub Action" git config --local user.email "info@weseek.co.jp" - name: Bump version run: | npm --no-git-tag-version version patch export RELEASE_VERSION=`npm run version --silent` sh ./bin/github-actions/update-readme.sh echo ::set-env name=RELEASE_VERSION::$RELEASE_VERSION - name: Commit and Tag run: | git commit -am "Release v${{ env.RELEASE_VERSION }}" git tag v${{ env.RELEASE_VERSION }} HEAD - name: Push tag run: | ORIGIN="https://${{ env.GITHUB_ACTOR }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ env.GITHUB_REPOSITORY }}" TMP_RELEASE_BRANCH=tmp/release-${{ env.RELEASE_VERSION }} git push $ORIGIN HEAD:$TMP_RELEASE_BRANCH --follow-tags git push --delete $ORIGIN $TMP_RELEASE_BRANCH - name: Upload release notes uses: Roang-zero1/github-create-release-action@master with: created_tag: v${{ env.RELEASE_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}