Skip to content

Commit 4da88b9

Browse files
committed
feat: add deployed URLs to CLI and Template deployments
1 parent 2e5d698 commit 4da88b9

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/deploy-cli.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
runs-on: ubuntu-latest
3939
environment:
4040
name: CLI
41+
url: https://www.npmjs.com/package/create-rootstrap-rn-app/v/${{ env.NEW_VERSION }}
4142
permissions:
4243
contents: write
4344
steps:
@@ -64,14 +65,14 @@ jobs:
6465
- name: 📦 Bump release version
6566
run: |
6667
cd cli
67-
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
68+
echo "NEW_VERSION=$(npm --no-git-tag-version --tag-version-prefix= version $RELEASE_TYPE)" >> $GITHUB_ENV
6869
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
6970
env:
7071
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
7172
- name: Commit package.json changes
7273
run: |
7374
git add "cli/package.json"
74-
git commit -m "build(cli): release CLI ${{ env.NEW_VERSION }}"
75+
git commit -m "build(cli): release CLI v${{ env.NEW_VERSION }}"
7576
- name: 🔑 Set publishing config
7677
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
7778
env:

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
environment:
4343
name: template
44+
url: https://github.com/rootstrap/react-native-template/releases/tag/v${{ env.NEW_VERSION }}
4445
permissions:
4546
contents: write
4647
steps:
@@ -66,3 +67,7 @@ jobs:
6667
- name: 🏃‍♂️ Run Template release
6768
run: |
6869
pnpm app-release ${{ github.event.inputs.release-type }}
70+
71+
- name: 📝 Get new package version
72+
run: |
73+
echo "NEW_VERSION=$(awk -F'"' '/"version": ".+"/{ print $4; exit; }' package.json)" >> $GITHUB_ENV

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.5",
3+
"version": "1.1.6",
44
"description": "Rootstrap expo starter cli",
55
"homepage": "https://github.com/rootstrap/react-native-template",
66
"repository": {

cli/setup-project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const updateGitHubWorkflows = (projectName) => {
9292
replaceValue: 'Run App release',
9393
},
9494
{
95-
searchValue: /^\s*environment:\s*\n\s*name:\s*template\s*\n/m,
95+
searchValue: /^\s*environment:\s*\n\s*name:\s*template\s*\n\s*url:\s*.+\s*\n/m,
9696
replaceValue: '',
9797
},
9898
],

0 commit comments

Comments
 (0)