Skip to content

Commit 2b52208

Browse files
committed
ci(publish): GitHub Action to automate the release of this package
1 parent 13a2ecd commit 2b52208

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
11+
packages: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
18+
- run: |
19+
echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc
20+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
21+
22+
- run: yarn
23+
- run: yarn run build
24+
25+
# Change the registry to npmjs (to publish)
26+
- run: |
27+
echo "registry=https://registry.npmjs.org/" > .npmrc
28+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
29+
30+
- run: npm publish --scope=@internxt --access public

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"author": "Internxt <[email protected]>",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "Internxt CLI to manage your encrypted storage",
55
"scripts": {
66
"build": "tsc",

0 commit comments

Comments
 (0)