Skip to content

Commit 4fbc50d

Browse files
committed
chore(cli): rename CLI deploy action
1 parent d4410d0 commit 4fbc50d

File tree

3 files changed

+18
-27
lines changed

3 files changed

+18
-27
lines changed
Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
#
1313

1414
# 🚨 GITHUB SECRETS REQUIRED:
15+
# - NPM_TOKEN: A NPM Access Token with Publish access.
1516
# - GH_TOKEN: A GitHub token with write repo access.
16-
# You can generate one from here: https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
17+
# You can generate one from here: https://github.com/settings/tokens
1718
# make sure to add it to the repo secrets with the name GH_TOKEN
19+
# Attention: Not to be confused with the GITHUB_TOKEN, this is a different token with different permissions.
1820

19-
name: New CLI Version
21+
name: Deploy CLI to NPM Registry
2022

2123
on:
2224
workflow_dispatch:
@@ -32,8 +34,7 @@ on:
3234
- major
3335

3436
jobs:
35-
release:
36-
name: Create New Version and push new tag
37+
deploy:
3738
runs-on: ubuntu-latest
3839
environment:
3940
name: CLI
@@ -43,53 +44,42 @@ jobs:
4344
- name: 🔍 GH_TOKEN
4445
if: env.GH_TOKEN == ''
4546
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
48-
47+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
48+
run: echo "GH_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV
4949
- name: 📦 Checkout project repo
5050
uses: actions/checkout@v3
5151
with:
5252
fetch-depth: 0
5353
token: ${{ secrets.GH_TOKEN }}
54-
5554
- name: 📝 Git User Setup
5655
run: |
5756
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
5857
git config --global user.name "github-actions[bot]"
59-
6058
- name: 📦 Setup Node + PNPM
6159
uses: ./.github/actions/setup-node-pnpm-install
62-
63-
- name: Install CLI dependencies
60+
- name: 📦 Install CLI Dependencies
6461
run: |
6562
cd cli
6663
pnpm install --frozen-lockfile
67-
68-
- name: Bump release version
64+
- name: 📦 Bump release version
6965
run: |
7066
cd cli
7167
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
7268
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
7369
env:
7470
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
75-
7671
- name: Commit package.json changes
7772
run: |
7873
git add "cli/package.json"
79-
git commit -m "build(cli): release ${{ env.NEW_VERSION }}"
80-
81-
- name: Set publishing config
82-
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
74+
git commit -m "build(cli): release CLI ${{ env.NEW_VERSION }}"
75+
- name: 🔑 Set publishing config
76+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
8377
env:
84-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
85-
86-
- name: Publish
78+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
79+
- name: 📦 Publish to NPM registry
8780
run: |
8881
cd cli
8982
pnpm publish --verbose --tag ${{ env.RELEASE_TAG }}
90-
91-
- name: Push changes to repository
92-
env:
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
- name: 🔗 Push changes to repository
9484
run: |
9585
git push origin && git push --tags

.github/workflows/new-app-version.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616

1717
# 🚨 GITHUB SECRETS REQUIRED:
1818
# - GH_TOKEN: A GitHub token with write repo access.
19-
# You can generate one from here: https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
19+
# You can generate one from here: https://github.com/settings/tokens
2020
# make sure to add it to the repo secrets with the name GH_TOKEN
21+
# Attention: Not to be confused with the GITHUB_TOKEN, this is a different token with different permissions.
2122

2223
name: New App Version
2324

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-rootstrap-rn-app",
3-
"version": "1.1.1",
3+
"version": "1.1.4",
44
"description": "Rootstrap expo starter cli",
55
"homepage": "https://github.com/rootstrap/react-native-template",
66
"repository": {

0 commit comments

Comments
 (0)