diff --git a/.github/workflows/pr-devops.yml b/.github/workflows/pr-devops.yml index 27797e5..3b704c6 100644 --- a/.github/workflows/pr-devops.yml +++ b/.github/workflows/pr-devops.yml @@ -10,6 +10,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set GitHub token + run: | + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GitHubToken }}" >> ~/.npmrc - name: Build Private Dependencies And Test run: | npm install diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c0d91eb..637a673 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,17 +5,27 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v3 + - name: Set GitHub token + run: | + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GitHubToken }}" >> ~/.npmrc - name: Setup Node uses: actions/setup-node@v3 + env: + NODE_AUTH_TOKEN: ${{ secrets.GitHubToken }} with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' + node-version: '18.x' + registry-url: https://npm.pkg.github.com + scope: '@razroo' - name: Install dependencies and build 🔧 - run: npm ci && npm run build + run: | + npm ci && npm run build - name: Publish package on NPM 📦 run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.GitHubToken }} \ No newline at end of file diff --git a/src/html-to-adf.ts b/src/html-to-adf.ts index bbe637d..de51a29 100644 --- a/src/html-to-adf.ts +++ b/src/html-to-adf.ts @@ -103,12 +103,4 @@ const convertToADF = (htmlString: string) => { }); return adf; -}; - -const htmlString = ` -

Your HTML string goes here

- -

Hello person I am

-`; -const result = convertToADF(htmlString); -console.log(JSON.stringify(result, null, 2)); +}; \ No newline at end of file