Skip to content

Commit 7b712a4

Browse files
authored
Publishing updates (#22)
* Don't ignore the themes dir * remove * Split publish task between theme registries;3B and npm * bump version
1 parent 84d8607 commit 7b712a4

File tree

8 files changed

+7701
-12
lines changed

8 files changed

+7701
-12
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: Publish to VS Marketplace
1+
name: Publish
22

33
on:
44
release:
55
types: [published]
66

77
jobs:
8-
publish:
8+
package:
9+
name: Publish to VS Marketplace & Open VSX
910
runs-on: ubuntu-latest
1011

1112
steps:
@@ -24,17 +25,38 @@ jobs:
2425
- name: Build theme
2526
run: npm run build
2627

27-
- name: Package extension
28-
run: npm run package
28+
- name: Rename package for extension publishing
29+
run: jq '.name = "pierre-theme"' package.json > tmp.json && mv tmp.json package.json
2930

3031
- name: Publish to VS Marketplace
3132
env:
3233
VSCE_PAT: ${{ secrets.VSCE_PAT }}
3334
run: npx @vscode/vsce publish --pat $VSCE_PAT
3435

35-
- name: Setup npm authentication
36-
run: |
37-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
36+
- name: Publish to Open VSX
37+
env:
38+
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}
39+
run: npx ovsx publish --pat $OVSX_PAT
40+
41+
npm:
42+
name: Publish to npm
43+
runs-on: ubuntu-latest
44+
permissions:
45+
id-token: write
46+
contents: read
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '20'
56+
cache: 'npm'
57+
registry-url: 'https://registry.npmjs.org'
3858

3959
- name: Publish to npm
40-
run: npm publish
60+
env:
61+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
run: npm publish --access public --provenance

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.DS_Store
22
node_modules/
3-
/themes/
43
build
54
*.vsix

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@pierre/theme",
33
"displayName": "Pierre Theme",
44
"description": "Pierre theme for Shiki, VS Code, and more",
5-
"version": "0.0.19",
5+
"version": "0.0.20",
66
"publisher": "pierrecomputer",
77
"icon": "icon.png",
88
"galleryBanner": {

0 commit comments

Comments
 (0)