Skip to content

Commit

Permalink
update static.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vlrmprjct authored Oct 23, 2024
1 parent 7f391ff commit 092e224
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,22 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: Verify Release Creation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release list
# - name: Verify Release Creation
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release list

- name: Get latest tag
id: get_latest_tag
run: |
TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
echo "LATEST_TAG=$TAG" >> $GITHUB_ENV
echo "$TAG"
# - name: Get latest tag
# id: get_latest_tag
# run: |
# TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
# echo "LATEST_TAG=$TAG" >> $GITHUB_ENV
# echo "$TAG"

- name: Install dependencies
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
Expand All @@ -73,14 +71,14 @@ jobs:
id: deployment
uses: actions/deploy-pages@v4

- name: Create release if not exists
id: check_release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view ${{ env.LATEST_TAG }}; then
echo "Release exists"
else
echo "Release does not exist"
gh release create ${{ env.LATEST_TAG }} --title "${{ env.LATEST_TAG }}" --notes "${{ env.LATEST_TAG }}"
fi
# - name: Create release if not exists
# id: check_release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# if gh release view ${{ env.LATEST_TAG }}; then
# echo "Release exists"
# else
# echo "Release does not exist"
# gh release create ${{ env.LATEST_TAG }} --title "${{ env.LATEST_TAG }}" --notes "${{ env.LATEST_TAG }}"
# fi

0 comments on commit 092e224

Please sign in to comment.