Skip to content

Commit

Permalink
Merge pull request #33 from release-kit/chore/refactor-release-workflow
Browse files Browse the repository at this point in the history
Refactor release workflow
  • Loading branch information
Evgeny Zakharov authored May 28, 2023
2 parents 948e038 + 9d98d18 commit 83b64d6
Showing 1 changed file with 1 addition and 84 deletions.
85 changes: 1 addition & 84 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Parse version from tag
id: version
uses: release-kit/semver@v2.0.4
uses: release-kit/semver@v2

- name: Force update remote latest release branch
run: git push origin ${{ github.event.release.tag_name }}:refs/heads/release/latest -f
Expand All @@ -33,86 +33,3 @@ jobs:

- name: Force update major release tag
run: git push origin ${{ github.event.release.tag_name }}:refs/tags/v${{ steps.version.outputs.major }} -f





#name: Release
#
#on:
# release:
# types: [published]
#
#jobs:
# get-meta:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout to tag
# uses: actions/checkout@v3
# with:
# ref: ${{ github.event.release.tag_name }}
# fetch-depth: 0
#
# - name: Parse semver string
# id: version
# uses: release-kit/semver@v1
#
# - name: Check branch existence
# id: branch-exists
# run: echo "::set-output name=flag::$(git ls-remote --heads ${{ github.server_url }}/${{ github.repository }} ${{ needs.get-meta.outputs.branch }} | wc -l)"
#
# outputs:
# tag: ${{ github.event.release.tag_name }}
# major: ${{ steps.version.outputs.major }}
# branch: ${{ steps.version.outputs.prerelease != null && 'release/${{ steps.version.outputs.prerelease }}' || 'release/latest' }}
# branch-exists: ${{ steps.branch-exists.outputs.flag == '1' }}
#
# sync-latest:
# runs-on: ubuntu-latest
# needs: get-meta
# if: needs.get-meta.outputs.branch == 'release/latest'
# steps:
# - name: Setup git
# run: |
# git config --global user.name "GitHub Actions Bot"
# git config --global user.email "<>"
#
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Create branch
# if: ${{ !needs.get-meta.outputs.branch-exists }}
# run: |
# git checkout -b ${{ needs.get-meta.outputs.branch }}
# git push -u origin ${{ needs.get-meta.outputs.branch }}
#
# - name: Checkout branch
# if: ${{ needs.get-meta.outputs.branch-exists }}
# run: git checkout ${{ needs.get-meta.outputs.branch }}
#
# - name: Override branch using tag HEAD
# run: git reset --hard ${{ needs.get-meta.outputs.tag }}
#
# - name: Update major tag
# run: git tag -f v${{ needs.get-meta.outputs.major }}
#
# - name: Push to protected branch
# uses: CasperWA/push-protected@v2
# env:
# TOKEN: ${{ secrets.FULL_ACCESS_GITHUB_TOKEN }}
# if: ${{ env.TOKEN != '' }}
# with:
# token: ${{ secrets.FULL_ACCESS_GITHUB_TOKEN }}
# branch: ${{ needs.get-meta.outputs.branch }}
# tags: true
# force: true
# unprotect_reviews: true
#
# - name: Push to unprotected branch
# env:
# TOKEN: ${{ secrets.FULL_ACCESS_GITHUB_TOKEN }}
# if: ${{ env.TOKEN == '' }}
# run: git push --tags --force

0 comments on commit 83b64d6

Please # to comment.