Skip to content

Commit

Permalink
ci(post-release): workflow for new major versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gliech committed Aug 25, 2020
1 parent 78470f8 commit 25b17bd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/post-major-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
on:
push:
tags:
- v[0-9]+.0.0
name: post-major-release
jobs:
main:
name: create major version pointer
runs-on: ubuntu-latest
steps:
- name: Get version prefix
run: |
GIT_REF=${{ github.ref }}
echo "::set-env name=VERSION_PREFIX::${GIT_REF:10:2}"
- name: Checkout new release
uses: actions/checkout@v2

- name: Create branch for pointer
run: |
git branch $VERSION_PREFIX
git push --set-upstream origin $VERSION_PREFIX
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ github.actor }}
GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com
3 changes: 2 additions & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+**
- 'v[0-9]+.[0-9]+.[0-9]+'
- '!v[0-9]+.0.0'
name: post-release
jobs:
main:
Expand Down

0 comments on commit 25b17bd

Please sign in to comment.