Skip to content

Commit 205ef3a

Browse files
authored
CI: Set tag during publish process (#33630)
1 parent 709ae08 commit 205ef3a

1 file changed

Lines changed: 3 additions & 24 deletions

File tree

.github/workflows/packages_publishing.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ env:
2020
NX_SKIP_NX_CACHE: true
2121
FILTER: ${{ github.event_name == 'workflow_dispatch' && inputs.filter || '' }}
2222
SET_TIMESTAMP_VERSION: ${{ inputs.tag == 'daily' }}
23-
MOVE_DAILY_TAG: ${{ inputs.tag == 'daily' }}
24-
MOVE_STABLE_TAG: ${{ inputs.tag == 'stable' }}
2523

2624
jobs:
2725
build:
@@ -145,32 +143,13 @@ jobs:
145143
working-directory: ${{ steps.scopedPackage.outputs.packageDir }}
146144
env:
147145
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148-
run: |
149-
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
150-
pnpm publish --no-git-checks --quiet --ignore-scripts --registry https://npm.pkg.github.com;
151-
152-
- name: Move 'daily' tag
153-
if: ${{ env.MOVE_DAILY_TAG == 'true' }}
154-
env:
155-
PACKAGE_NAME: ${{ steps.scopedPackage.outputs.name }}
156-
PACKAGE_VERSION: ${{ steps.scopedPackage.outputs.version }}
157-
PACKAGE_VERSION_MAJOR: ${{ steps.scopedPackage.outputs.majorVersion }}
158-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
159-
run: |
160-
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN"
161-
pnpm dist-tag add $PACKAGE_NAME@$PACKAGE_VERSION $PACKAGE_VERSION_MAJOR-daily --registry=https://npm.pkg.github.com
162-
163-
- name: Move 'stable' tag
164-
if: ${{ env.MOVE_STABLE_TAG == 'true' }}
165-
env:
166146
PACKAGE_NAME: ${{ steps.scopedPackage.outputs.name }}
167147
PACKAGE_VERSION: ${{ steps.scopedPackage.outputs.version }}
168148
PACKAGE_VERSION_MAJOR: ${{ steps.scopedPackage.outputs.majorVersion }}
169-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170149
run: |
171-
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN"
172-
pnpm dist-tag add $PACKAGE_NAME@$PACKAGE_VERSION $PACKAGE_VERSION_MAJOR-stable --registry=https://npm.pkg.github.com
173-
150+
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
151+
pnpm publish --no-git-checks --quiet --ignore-scripts --tag $PACKAGE_VERSION_MAJOR-${{ inputs.tag }} --registry https://npm.pkg.github.com;
152+
pnpm dist-tag add $PACKAGE_NAME@$PACKAGE_VERSION latest --registry=https://npm.pkg.github.com;
174153
175154
notify:
176155
runs-on: devextreme-shr2

0 commit comments

Comments
 (0)