Skip to content

Commit ea9010e

Browse files
authored
Merge pull request #9 from SolidOS/update-publish-workflow
update publish workflow
2 parents e390af1 + bfb63d4 commit ea9010e

3 files changed

Lines changed: 28 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- 14.x
1818
- 16.x
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- run: npm ci
@@ -28,7 +28,7 @@ jobs:
2828
- run: npm run build
2929
- name: Save build
3030
if: matrix.node-version == '14.x'
31-
uses: actions/upload-artifact@v2
31+
uses: actions/upload-artifact@v4
3232
with:
3333
name: build
3434
path: |
@@ -39,37 +39,45 @@ jobs:
3939
npm-publish-build:
4040
needs: test
4141
runs-on: ubuntu-latest
42+
permissions:
43+
id-token: write # Required for OIDC
44+
contents: read
4245
steps:
43-
- uses: actions/download-artifact@v2
46+
- uses: actions/download-artifact@v4
4447
with:
4548
name: build
46-
- uses: actions/setup-node@v1
49+
- uses: actions/setup-node@v4
4750
with:
48-
node-version: 14.x
51+
node-version: 20.x
52+
registry-url: 'https://registry.npmjs.org'
53+
- name: Update npm to latest (required for OIDC)
54+
run: npm install -g npm@latest
4955
- uses: rlespinasse/github-slug-action@v3.x
5056
- name: Append commit hash to package version
5157
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
5258
- name: Disable pre- and post-publish actions
5359
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
54-
- uses: JS-DevTools/npm-publish@v1
55-
with:
56-
token: ${{ secrets.NPM_TOKEN }}
57-
tag: ${{ env.GITHUB_REF_SLUG }}
60+
- name: Publish to npm
61+
run: npm publish --tag ${{ env.GITHUB_REF_SLUG }}
5862

5963
npm-publish-latest:
6064
needs: test
6165
runs-on: ubuntu-latest
6266
if: github.ref == 'refs/heads/main'
67+
permissions:
68+
id-token: write # Required for OIDC
69+
contents: read
6370
steps:
64-
- uses: actions/download-artifact@v2
71+
- uses: actions/download-artifact@v4
6572
with:
6673
name: build
67-
- uses: actions/setup-node@v1
74+
- uses: actions/setup-node@v4
6875
with:
69-
node-version: 14.x
76+
node-version: 20.x
77+
registry-url: 'https://registry.npmjs.org'
78+
- name: Update npm to latest (required for OIDC)
79+
run: npm install -g npm@latest
7080
- name: Disable pre- and post-publish actions
7181
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
72-
- uses: JS-DevTools/npm-publish@v1
73-
with:
74-
token: ${{ secrets.NPM_TOKEN }}
75-
tag: latest
82+
- name: Publish to npm
83+
run: npm publish --tag latest

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/solid/markdown-pane.git"
7+
"url": "https://github.com/SolidOS/markdown-pane.git"
88
},
99
"main": "lib/index.js",
1010
"scripts": {

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
NewPaneOptions,
66
PaneDefinition,
77
} from "pane-registry";
8-
import { NamedNode, sym } from "rdflib";
8+
import { IndexedFormula, NamedNode, sym } from "rdflib";
99
import { icons, store } from "solid-ui";
1010
import { saveMarkdown } from "./service";
1111
import { Container } from "./container";
@@ -18,7 +18,7 @@ export const Pane: PaneDefinition = {
1818
subject: NamedNode,
1919
context: DataBrowserContext
2020
): string | null {
21-
const t = context.session.store.findTypeURIs(subject);
21+
const t = (context.session.store as IndexedFormula).findTypeURIs(subject);
2222
if (t["http://www.w3.org/ns/iana/media-types/text/markdown#Resource"]) {
2323
return "Markdown";
2424
}

0 commit comments

Comments
 (0)