diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e12af90..daac525 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 \ No newline at end of file