Release #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| new_version: | |
| description: 'New version' | |
| required: true | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout master | |
| uses: actions/checkout@v1 | |
| with: | |
| ref: 'master' | |
| - name: Checkout develop | |
| uses: actions/checkout@v1 | |
| with: | |
| ref: 'develop' | |
| clean: false | |
| - name: Install git-flow | |
| run: sudo apt-get install git-flow -y | |
| - name: Configure commiter | |
| run: | | |
| git config --local user.email "${{ secrets.WORKER_EMAIL }}" | |
| git config --local user.name "${{ secrets.WORKER_NAME }}" | |
| - name: Init git-flow | |
| run: git flow init -d | |
| - name: Start release | |
| run: git flow release start ${{ github.event.inputs.new_version }} | |
| - name: Replace 1.1.6 tags with new version number | |
| uses: jacobtomlinson/gha-find-replace@master | |
| with: | |
| find: "(?i)\\[Next\\]" | |
| replace: "${{ github.event.inputs.new_version }}" | |
| - name: Replace stable tag in package.json | |
| uses: jacobtomlinson/gha-find-replace@master | |
| with: | |
| find: "\"version\": \"[0-9]+.[0-9]+.[0-9]+\"" | |
| replace: "\"version\": \"${{ github.event.inputs.new_version }}\"" | |
| include: "package.json" | |
| - name: Commit version bump | |
| run: git commit -am "Version bump" | |
| - name: Finish release | |
| run: git flow release finish ${{ github.event.inputs.new_version }} -m "v${{ github.event.inputs.new_version }}" | |
| - name: Push develop and tags | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.WORKER_TOKEN }} | |
| branch: 'develop' | |
| - name: Push master | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.WORKER_TOKEN }} | |
| branch: 'master' |