Skip to content

Docs: Introduce Tokens Structure Decision #1498

Docs: Introduce Tokens Structure Decision

Docs: Introduce Tokens Structure Decision #1498

Workflow file for this run

name: 🚢 Publish
on:
push:
branches:
- main
jobs:
has-tags:
name: 🏷️ Analyze Tags
runs-on: ubuntu-24.04
outputs:
has-tag: ${{ steps.check-tag-exists.outputs.has-tag }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-tags: true
# ⚠️ This check works only if the tag is pushed alongside the commit
# Please, use `git push && git push --tags` or `git push --follow-tags` (works only for annonated tags)
- name: Check Tag On Commit
id: check-tag-exists
run: |
if [ -n "$(git tag --points-at HEAD)" ]; then
echo "has-tag=true" >> $GITHUB_OUTPUT
else
echo "has-tag=false" >> $GITHUB_OUTPUT
fi
publish:
name: 📦 Publish Packages
needs: has-tags
if: ${{ needs.has-tags.outputs.has-tag == 'true' }}
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Build
run: yarn build
- name: Authenticate npm
run: ./bin/ci/npm-auth.sh
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
run: make publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}