raycast-rsync-extension 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,54 +27,5 @@ jobs:
27
27
  fetch-depth: 0
28
28
  fetch-tags: true
29
29
 
30
- - name: Ensure main has commits after latest tag
31
- run: |
32
- set -euo pipefail
33
- git fetch origin main --tags
34
-
35
- if ! git rev-parse --verify origin/main >/dev/null 2>&1; then
36
- echo "::error::Could not resolve origin/main"
37
- exit 1
38
- fi
39
-
40
- LATEST_TAG="$(git tag --merged origin/main --sort=-version:refname | head -n1 || true)"
41
- if [ -z "$LATEST_TAG" ]; then
42
- echo "No tags on main's history yet; continuing (no baseline tag to compare)."
43
- exit 0
44
- fi
45
-
46
- COUNT="$(git rev-list --count "${LATEST_TAG}"..origin/main)"
47
- if [ "$COUNT" -eq 0 ]; then
48
- echo "::error::main has no commits after tag '${LATEST_TAG}'. Merge or push changes before bumping the patch version."
49
- exit 1
50
- fi
51
-
52
- echo "main is ${COUNT} commit(s) ahead of tag '${LATEST_TAG}'."
53
-
54
- - name: Setup Node
55
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
56
- with:
57
- node-version: "22"
58
-
59
- - name: Bump patch version
60
- id: bump
61
- run: |
62
- npm version patch --no-git-tag-version
63
- VERSION=$(node -p "require('./package.json').version")
64
- echo "version=$VERSION" >> $GITHUB_OUTPUT
65
- echo "New version: $VERSION"
66
-
67
- - name: Create Pull Request
68
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
69
- with:
70
- commit-message: "chore: bump version to ${{ steps.bump.outputs.version }}"
71
- branch: "chore/bump-patch-version-${{ github.run_id }}"
72
- delete-branch: true
73
- title: "chore: bump version to ${{ steps.bump.outputs.version }}"
74
- body: |
75
- This PR bumps the **patch** version in `package.json` (via `npm version patch --no-git-tag-version`).
76
-
77
- Triggered manually from [bump-patch-version](https://github.com/${{ github.repository }}/actions/workflows/bump-patch-version.yml).
78
-
79
- After merge, the [Publish](https://github.com/${{ github.repository }}/actions/workflows/publish.yml) workflow can publish the new version when it runs on `main`.
80
- labels: "ci, maintenance"
30
+ - name: Bump patch version and open PR
31
+ uses: dytsou/bump-patch-version@c701135f6aa39a1e849b52a385816e8ec465c2bc # v1.0.0 (@v1)
@@ -1,4 +1,4 @@
1
- name: Publish to GitHub Packages
1
+ name: Publish to npmjs & GitHub Packages
2
2
 
3
3
  on:
4
4
  push:
@@ -8,92 +8,33 @@ on:
8
8
  - "package.json"
9
9
  - "package-lock.json"
10
10
  - "src/**"
11
+ release:
12
+ types: [created]
11
13
  workflow_dispatch:
12
- inputs:
13
- version_bump:
14
- description: "Version bump type (patch, minor, major)"
15
- required: false
16
- default: "patch"
17
- type: choice
18
- options:
19
- - patch
20
- - minor
21
- - major
22
14
 
23
- jobs:
24
- check-version:
25
- runs-on: ubuntu-latest
26
- permissions:
27
- contents: read
28
- packages: read
29
- outputs:
30
- exists: ${{ steps.check-version.outputs.exists }}
31
- version: ${{ steps.package-info.outputs.version }}
32
- name: ${{ steps.package-info.outputs.name }}
33
- steps:
34
- - name: Checkout code
35
- uses: actions/checkout@v7
36
-
37
- - name: Setup Node.js
38
- uses: actions/setup-node@v7
39
- with:
40
- node-version: "22"
41
- cache: "npm"
42
-
43
- - name: Get package info
44
- id: package-info
45
- run: |
46
- VERSION=$(node -p "require('./package.json').version")
47
- NAME=$(node -p "require('./package.json').name")
48
-
49
- echo "version=$VERSION" >> $GITHUB_OUTPUT
50
- echo "name=$NAME" >> $GITHUB_OUTPUT
51
- echo "Package: $NAME@$VERSION"
52
-
53
- - name: Check if version exists
54
- id: check-version
55
- run: |
56
- VERSION=${{ steps.package-info.outputs.version }}
57
- PACKAGE_NAME="${{ steps.package-info.outputs.name }}"
58
- OWNER="${{ github.repository_owner }}"
59
- SCOPED_NAME="@${OWNER}/${PACKAGE_NAME}"
60
-
61
- # Set up GitHub Packages registry
62
- npm config set registry https://npm.pkg.github.com
63
- npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
64
-
65
- # Check if the scoped package version already exists
66
- if npm view "${SCOPED_NAME}@${VERSION}" version >/dev/null 2>&1; then
67
- echo "exists=true" >> $GITHUB_OUTPUT
68
- echo "Version ${VERSION} already exists for ${SCOPED_NAME}, skipping publish"
69
- else
70
- echo "exists=false" >> $GITHUB_OUTPUT
71
- echo "Version ${VERSION} is new for ${SCOPED_NAME}, will publish"
72
- fi
73
-
74
- - name: Skip summary
75
- if: steps.check-version.outputs.exists == 'true'
76
- run: |
77
- echo "## 📦 Publish Summary"
78
- echo "Package: ${{ steps.package-info.outputs.name }}@${{ steps.package-info.outputs.version }}"
79
- echo "✅ Version already exists - skipped publishing (no tests/build run)"
15
+ permissions:
16
+ contents: read
80
17
 
18
+ jobs:
81
19
  publish:
82
- needs: check-version
83
- if: needs.check-version.outputs.exists == 'false'
84
20
  runs-on: ubuntu-latest
85
21
  permissions:
86
22
  contents: write
87
23
  packages: write
88
24
  id-token: write
89
25
  steps:
26
+ - name: Harden the runner (Audit all outbound calls)
27
+ uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
28
+ with:
29
+ egress-policy: audit
30
+
90
31
  - name: Checkout code
91
- uses: actions/checkout@v7
32
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
92
33
  with:
93
34
  fetch-depth: 0
94
35
 
95
36
  - name: Setup Node.js
96
- uses: actions/setup-node@v7
37
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
97
38
  with:
98
39
  node-version: "22"
99
40
  cache: "npm"
@@ -101,106 +42,83 @@ jobs:
101
42
  - name: Install dependencies
102
43
  run: npm ci
103
44
 
104
- - name: Install jq
105
- run: sudo apt-get update && sudo apt-get install -y jq
106
-
107
45
  - name: Run tests
108
46
  run: npm test
109
47
 
110
48
  - name: Build extension
111
49
  run: npm run build
112
50
 
113
- - name: Publish to GitHub Packages
114
- run: |
115
- PACKAGE_NAME="${{ needs.check-version.outputs.name }}"
116
- VERSION=${{ needs.check-version.outputs.version }}
117
- OWNER="${{ github.repository_owner }}"
118
-
119
- echo "Publishing $PACKAGE_NAME@$VERSION to GitHub Packages..."
120
-
121
- # Configure npm to use GitHub Packages registry
122
- npm config set registry https://npm.pkg.github.com
123
- npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
124
-
125
- # For unscoped packages, GitHub Packages requires the package to be published
126
- # with the owner namespace. We'll temporarily modify package.json for publishing.
127
- cp package.json package.json.backup
128
- jq --arg owner "$OWNER" --arg name "$PACKAGE_NAME" \
129
- '.name = ("@" + $owner + "/" + $name)' package.json > package.json.temp
130
- mv package.json.temp package.json
131
-
132
- # Publish to GitHub Packages with scoped name
133
- npm publish
134
-
135
- # Restore original package.json
136
- mv package.json.backup package.json
137
-
138
- echo "Successfully published $OWNER/$PACKAGE_NAME@$VERSION to GitHub Packages"
139
- env:
140
- NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141
-
51
+ # npm-only repo: skip pnpm install/pack; publish with already-installed node_modules.
142
52
  - name: Publish to npmjs
143
- run: |
144
- PACKAGE_NAME="${{ needs.check-version.outputs.name }}"
145
- VERSION=${{ needs.check-version.outputs.version }}
146
- OWNER="${{ github.repository_owner }}"
147
-
148
- echo "Publishing $PACKAGE_NAME@$VERSION to npmjs..."
149
-
150
- npm config set @dytsou:registry https://registry.npmjs.org
151
- npm config set registry https://registry.npmjs.org
152
- npm config set //registry.npmjs.org/:_authToken "$NODE_AUTH_TOKEN"
153
-
154
- npm publish --access public --registry=https://registry.npmjs.org
155
-
156
- echo "Successfully published $PACKAGE_NAME@$VERSION to npmjs"
157
- env:
158
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53
+ id: npmjs
54
+ uses: dytsou/release/npm-publish@7af1faa22bbe1de08a413860db44122b6b9f7c24 # v1.2.1 (@v1)
55
+ with:
56
+ npm-token: ${{ secrets.NPM_TOKEN }}
57
+ install-deps: "false"
58
+ verify-pack: "false"
59
+ node-version: "22"
159
60
 
160
- - name: Create Git tag
61
+ # GitHub Packages requires a scoped name; temporarily rewrite package.json.
62
+ - name: Scope package name for GitHub Packages
161
63
  run: |
162
- VERSION=${{ needs.check-version.outputs.version }}
163
- PACKAGE_NAME="${{ needs.check-version.outputs.name }}"
64
+ set -euo pipefail
65
+ cp package.json package.json.backup
66
+ jq --arg owner "${{ github.repository_owner }}" --arg name "$(node -p "require('./package.json').name")" \
67
+ '.name = ("@" + $owner + "/" + $name)' package.json > package.json.tmp
68
+ mv package.json.tmp package.json
164
69
 
165
- TAG_NAME="v$VERSION"
70
+ - name: Publish to GitHub Packages
71
+ id: ghpkg
72
+ uses: dytsou/release/github-packages@7af1faa22bbe1de08a413860db44122b6b9f7c24 # v1.2.1 (@v1)
73
+ with:
74
+ token: ${{ secrets.GITHUB_TOKEN }}
75
+ install-deps: "false"
76
+ verify-pack: "false"
77
+ node-version: "22"
166
78
 
167
- # Check if tag already exists
168
- if git tag -l | grep -q "^$TAG_NAME$"; then
169
- echo "Tag $TAG_NAME already exists, skipping tag creation"
170
- else
171
- echo "Creating tag $TAG_NAME"
172
- git config --local user.email "action@github.com"
173
- git config --local user.name "GitHub Action"
174
- git tag "$TAG_NAME"
175
- git push origin "$TAG_NAME"
176
- echo "Tag $TAG_NAME created and pushed"
79
+ - name: Restore package.json
80
+ if: always()
81
+ run: |
82
+ if [ -f package.json.backup ]; then
83
+ mv package.json.backup package.json
177
84
  fi
178
85
 
179
- - name: Create GitHub Release
180
- uses: softprops/action-gh-release@v3
86
+ - name: GitHub Release
87
+ if:
88
+ steps.npmjs.outputs.published == 'true' ||
89
+ steps.ghpkg.outputs.published == 'true'
90
+ uses: dytsou/release/github@7af1faa22bbe1de08a413860db44122b6b9f7c24 # v1.2.1 (@v1)
181
91
  with:
182
- tag_name: v${{ needs.check-version.outputs.version }}
183
- name: v${{ needs.check-version.outputs.version }}
92
+ from-package-json: "true"
93
+ move-major-tag: "false"
184
94
  body: |
185
- ## ${{ needs.check-version.outputs.name }}@v${{ needs.check-version.outputs.version }}
95
+ ## ${{ steps.npmjs.outputs.name }}@${{ steps.npmjs.outputs.version }}
96
+
97
+ **Published to multiple registries:**
98
+
99
+ - **npmjs.com**: https://www.npmjs.com/package/${{ steps.npmjs.outputs.name }}
100
+
101
+ - **GitHub Packages**: https://github.com/${{ github.repository }}/packages
186
102
 
187
- **Published to GitHub Packages and npmjs**
103
+ *Note: If a registry already had this version, it was skipped. Only missing registries were published.*
188
104
 
189
105
  ### Installation
190
106
 
191
- **npmjs** (recommended):
107
+ **From npmjs (recommended):**
108
+
192
109
  ```bash
193
- npm install raycast-rsync-extension
110
+ npm install ${{ steps.npmjs.outputs.name }}
194
111
  ```
195
112
 
196
- **GitHub Packages**:
113
+ **From GitHub Packages:**
114
+
197
115
  ```bash
198
- npm install @${{ github.repository_owner }}/${{ needs.check-version.outputs.name }} --registry=https://npm.pkg.github.com
116
+ npm install @${{ github.repository_owner }}/${{ steps.npmjs.outputs.name }} --registry=https://npm.pkg.github.com
199
117
  ```
200
118
 
201
119
  Or add to your `.npmrc`:
202
120
 
203
- ```
121
+ ```ini
204
122
  @${{ github.repository_owner }}:registry=https://npm.pkg.github.com
205
123
  //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
206
124
  ```
@@ -208,31 +126,27 @@ jobs:
208
126
  Then install:
209
127
 
210
128
  ```bash
211
- npm install ${{ needs.check-version.outputs.name }}
129
+ npm install @${{ github.repository_owner }}/${{ steps.npmjs.outputs.name }}
212
130
  ```
213
131
 
214
- ### What's New
215
-
216
- - Automated release from CI/CD pipeline
217
- - All tests passed ✅
218
- - Extension built successfully ✅
219
-
220
- draft: false
221
- prerelease: false
222
- env:
223
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
224
-
225
- - name: Publish Summary
132
+ - name: Publish summary
133
+ if: always()
226
134
  run: |
227
135
  echo "## Publish Summary"
228
- echo "Package: ${{ needs.check-version.outputs.name }}@${{ needs.check-version.outputs.version }}"
229
- echo "Successfully published to GitHub Packages and npmjs"
230
- echo "Created tag: v${{ needs.check-version.outputs.version }}"
231
- echo "Created release: v${{ needs.check-version.outputs.version }}"
136
+ echo "### npmjs"
137
+ if [ "${{ steps.npmjs.outputs.skipped }}" == "true" ]; then
138
+ echo "Skipped - version already exists"
139
+ elif [ "${{ steps.npmjs.outputs.published }}" == "true" ]; then
140
+ echo "Published successfully"
141
+ else
142
+ echo "Not published"
143
+ fi
232
144
  echo ""
233
- echo "### 🔗 Links"
234
- echo "- **npmjs**: https://www.npmjs.com/package/${{ needs.check-version.outputs.name }}"
235
- echo "- **GitHub Packages**: https://github.com/${{ github.repository }}/packages"
236
- echo "- **Install Command (npmjs)**: npm install ${{ needs.check-version.outputs.name }}"
237
- echo "- **Install Command (GitHub Packages)**: npm install @${{ github.repository_owner }}/${{ needs.check-version.outputs.name }} --registry=https://npm.pkg.github.com"
238
- echo "- **Release**: https://github.com/${{ github.repository }}/releases/tag/v${{ needs.check-version.outputs.version }}"
145
+ echo "### GitHub Packages"
146
+ if [ "${{ steps.ghpkg.outputs.skipped }}" == "true" ]; then
147
+ echo "Skipped - version already exists"
148
+ elif [ "${{ steps.ghpkg.outputs.published }}" == "true" ]; then
149
+ echo "Published successfully"
150
+ else
151
+ echo "Not published"
152
+ fi
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.raycast.com/schemas/extension.json",
3
3
  "name": "raycast-rsync-extension",
4
- "version": "1.0.19",
4
+ "version": "1.0.21",
5
5
  "title": "Rsync File Transfer",
6
6
  "description": "Transfer files between local and remote servers using rsync with SSH config integration",
7
7
  "icon": "icon.png",
@@ -97,4 +97,4 @@
97
97
  "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
98
98
  "publish:npmjs": "npm publish --access public"
99
99
  }
100
- }
100
+ }