Skip to content

Commit

Permalink
fix: get packaging going
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Jul 5, 2024
1 parent 3264582 commit fcddb65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ on:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
id-token: write
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release:
Expand All @@ -20,17 +27,21 @@ jobs:
with:
bun-version: latest

- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org/"

- name: Install Dependencies
run: bun i
run: bun i && bun run build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: bun run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Send release notification
if: steps.changesets.outputs.published == 'true'
Expand All @@ -39,7 +50,7 @@ jobs:
with:
payload: |
{
"message": "[Tiptap Editor Release]: New Tiptap Editor version has been released to NPM."
"message": "[Draftjs-to-Tiptap Release]: New draftjs-to-tiptap version has been released to NPM."
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand All @@ -51,7 +62,7 @@ jobs:
with:
payload: |
{
"message": "[Tiptap Editor Release]: There was an issue publishing a new version. You can find the logs here: https://github.com/ueberdosis/tiptap/actions/runs/${{ github.run_id }}"
"message": "[Draftjs-to-Tiptap Release]: There was an issue publishing a new version. You can find the logs here: https://github.com/ueberdosis/tiptap/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"changeset": "changeset",
"version-packages": "changeset version",
"test": "bun test",
"prerelease": "bun run build",
"release": "changesets publish",
"prebuild": "rm -rf dist",
Expand All @@ -25,6 +26,7 @@
"@types/prosemirror-model": "^1.17.0"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
}
}

0 comments on commit fcddb65

Please sign in to comment.