| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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"
- git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
- - 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: Checkout, Commit, Tag and Push
- run: |
- TMP_RELEASE_BRANCH=tmp/release-${{ env.RELEASE_VERSION }}
- git checkout -B $TMP_RELEASE_BRANCH
- git commit -am "Release v${{ env.RELEASE_VERSION }}"
- git tag v${{ env.RELEASE_VERSION }}
- git push --follow-tags origin $TMP_RELEASE_BRANCH
- 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 }}
|