Skip to content

Commit

Permalink
Remove version extraction and update steps from workflow
Browse files Browse the repository at this point in the history
These steps are redundant due to changes in the release process. The versioning tasks and committing version changes are now handled by another part of the pipeline. This simplifies the workflow and avoids potential conflicts.
  • Loading branch information
dennisofficial committed Sep 24, 2024
1 parent 46b505d commit fd78999
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,6 @@ jobs:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/${{ inputs.target }}@}" >> $GITHUB_ENV

- name: Confirm version
run: echo "Version is $VERSION"

- name: Update version in package.json
run: |
jq --arg version "$VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
shell: bash

- name: Commit and push version change
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Extract branch name from GITHUB_REF
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
# Add, commit, and push changes to the branch
git add package.json
git commit -m "chore(release): update version to $VERSION"
git push origin HEAD:$BRANCH_NAME --no-tags
# Force update the tag to include the new commit
git tag -f "${{ github.event.release.tag_name }}"
git push origin --force --tags
shell: bash

- name: Install dependencies
run: pnpm install
shell: bash
Expand Down

0 comments on commit fd78999

Please sign in to comment.