Tag Next Release #132
This file contains 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: Tag Next Release | |
on: | |
schedule: | |
- cron: "0 18 * * 0" # every Sunday at 6pm UTC | |
workflow_dispatch: | |
jobs: | |
main: | |
name: Tag Next Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- id: before-version-update | |
name: get current version | |
run: 'echo ::set-output "name=version::$(cat version/docset)"' | |
- run: make version/update | |
- id: after-version-update | |
name: get new version | |
run: 'echo ::set-output "name=version::$(cat version/docset)"' | |
- name: push tag | |
if: ${{ steps.before-version-update.outputs.version != steps.after-version-update.outputs.version }} | |
run: | | |
git config --global user.email "${{ secrets.CI_USER_EMAIL }}" | |
git config --global user.name "${{ secrets.CI_USER_NAME }}" | |
git add . | |
git commit -m "v${{ steps.after-version-update.outputs.version }}" | |
git tag v${{ steps.after-version-update.outputs.version }} | |
git push \ | |
"https://${{ secrets.CI_USER_USERNAME }}:${{ secrets.CI_USER_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" \ | |
HEAD:main \ | |
--tags |