Skip to content

Commit

Permalink
Updated publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarmaged committed Jun 7, 2024
1 parent 6387e68 commit 20c238e
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,11 @@ jobs:
- name: Yarn build
run: yarn build

- name: Remove existing tag
run: |
TAG=${GITHUB_REF#refs/tags/}
git tag -d $TAG
git push origin :refs/tags/$TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push updated files
run: |
git checkout -B temp-branch
git add .
git commit -m "chore(release): update version to ${GITHUB_REF#refs/tags/v}"
git push origin temp-branch
git checkout ${{ github.ref }}
git merge temp-branch
git push origin ${{ github.ref }}
git branch -d temp-branch
git push origin --delete temp-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create and push tag
run: |
TAG=${GITHUB_REF#refs/tags/}
git tag $TAG
git push origin $TAG
git push origin HEAD:${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 20c238e

Please sign in to comment.