Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZETA-7325: Add github workflow so publishes as private package #2

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/pr-devops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
NODE_AUTH_TOKEN: ${{ secrets.GitHubToken }}
10 changes: 1 addition & 9 deletions src/html-to-adf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,4 @@ const convertToADF = (htmlString: string) => {
});

return adf;
};

const htmlString = `
<p>Your <b>HTML</b> string goes here</p>

<p>Hello person <i>I am</i></p>
`;
const result = convertToADF(htmlString);
console.log(JSON.stringify(result, null, 2));
};
Loading