Skip to content

Commit

Permalink
Release CI updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramtamtam committed Jan 25, 2021
1 parent f5a2d89 commit 04d43ee
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ jobs:
with:
fetch-depth: 1

- name: Get version value
run: echo "::set-env name=_VERSION::${GITHUB_REF##*/}"

- name: Get major version value (without 'v' prefix)
run: echo "::set-env name=_MAJOR::`echo $_VERSION | sed 's#^[vV]\([0-9]*\)\..*$#\1#'`"
- name: Generate values
id: values
run: echo "::set-output name=major::`echo ${GITHUB_REF##*/} | sed 's#^[vV]\([0-9]*\)\..*$#\1#'`"

- name: Setup git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Create tag
run: git tag -fa "v${_MAJOR}" -m "Update v${_MAJOR} tag (using GitHub actions)"
run: git tag -fa "v${{ steps.values.outputs.major }}" -m "Update v${{ steps.values.outputs.major }} tag (using GitHub actions)"

- name: Push tag
run: git push "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" "v${_MAJOR}" --force
run: git push "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" "v${{ steps.values.outputs.major }}" --force

0 comments on commit 04d43ee

Please sign in to comment.