Skip to content

Commit

Permalink
ci: delete unnecessary step
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbae0 committed Mar 23, 2024
1 parent 34713b8 commit 0480a8c
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,8 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: pnpm install
# Define ${CURRENT_VERSION}
- name: Set Current Version
run: |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Tag Check
id: tag_check
run: |
GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/v${CURRENT_VERSION}"
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \
-H "Authorization: token ${GITHUB_TOKEN}")
if [ "$http_status_code" -ne "404" ] ; then
echo "::set-output name=exists_tag::true"
else
echo "::set-output name=exists_tag::false"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Git Tag
if: steps.tag_check.outputs.exists_tag == 'false'
uses: pkgdeps/git-tag-action@v2
with:
version: ${{ env.CURRENT_VERSION }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"
- name: Publish to Github Registry
run: pnpm run publish from-git --yes
env:
Expand Down

0 comments on commit 0480a8c

Please sign in to comment.