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

Add npm publish to GitHub actions #203

Merged
merged 3 commits into from
Aug 29, 2023
Merged
Changes from 1 commit
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
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published

permissions:
contents: read

jobs:
publish-npm:
name: 'NPM'
frederikprijck marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
environment: release

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
frederikprijck marked this conversation as resolved.
Show resolved Hide resolved

- name: Build package
run: npm run build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this step required? Would it not be better to handle this in the prepublishOnly script?

Copy link
Member Author

@frederikprijck frederikprijck Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a migrate to github actions as is, can circle back. It was like this before.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, then let's just leave it as is :)


- name: Publish release to NPM
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}