-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (32 loc) · 1.21 KB
/
tag-next-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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