Skip to content

Commit f8b423e

Browse files
Merge pull request #538 from appwrite/feat-npm-rc-deployments
Allow NPM RC deployments
2 parents 359ab5a + cebd67a commit f8b423e

File tree

3 files changed

+42
-17
lines changed

3 files changed

+42
-17
lines changed

templates/cli/.github/workflows/npm-publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ jobs:
3131
npm run mac-x64
3232
npm run mac-arm64
3333
- name: Publish NPM library
34-
run: npm publish
34+
run: |
35+
if ${{ contains(github.event.release.tag_name, '-RC') }}; then
36+
echo "Publishing Release Candidate ${{ github.event.release.tag_name}} to NPM"
37+
npm publish --tag next
38+
else
39+
echo "Publishing ${{ github.event.release.tag_name}} to NPM"
40+
npm publish
41+
fi
3542
env:
3643
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3744
- uses: fnkr/github-action-ghr@v1

templates/node/.travis.yml.twig

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
21
language: node_js
32
node_js:
4-
- "14.16"
3+
- "18.8.0"
54

65
jobs:
76
include:
8-
- stage: npm release
9-
node_js: "14.16"
10-
script: echo "Deploying to npm ..."
7+
- stage: NPM RC Release
8+
if: tag == *-RC*
9+
node_js: "18.8.0"
10+
script: echo "Deploying RC to NPM..."
11+
deploy:
12+
provider: npm
13+
email: $NPM_EMAIL
14+
api_key: $NPM_API_KEY
15+
tag: next
16+
- stage: NPM Release
17+
if: tag != *-RC*
18+
node_js: "18.8.0"
19+
script: echo "Deploying to NPM..."
1120
deploy:
1221
provider: npm
1322
email: $NPM_EMAIL

templates/web/.travis.yml.twig

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
21
language: node_js
32
node_js:
4-
- "14.16"
3+
- "18.8.0"
54

65
jobs:
76
include:
8-
- stage: npm release
9-
node_js: "14.16"
10-
script:
11-
- echo "Installing dependencies ..."
12-
- npm i
13-
- echo "Building library ..."
7+
- stage: NPM RC Release
8+
if: tag == *-RC*
9+
node_js: "18.8.0"
10+
script:
11+
- npm install
1412
- npm run build
15-
- echo "Deploying to npm ..."
13+
- echo "Deploying RC to NPM..."
14+
deploy:
15+
provider: npm
16+
email: $NPM_EMAIL
17+
api_key: $NPM_API_KEY
18+
tag: next
19+
- stage: NPM Release
20+
if: tag != *-RC*
21+
node_js: "18.8.0"
22+
script:
23+
- npm install
24+
- npm run build
25+
- echo "Deploying to NPM..."
1626
deploy:
1727
provider: npm
1828
email: $NPM_EMAIL
1929
api_key: $NPM_API_KEY
20-
skip_cleanup: true
2130
on:
22-
tags: true
31+
tags: true

0 commit comments

Comments
 (0)