Skip to content

Commit

Permalink
Merge pull request #2 from martinRenou/publishing
Browse files Browse the repository at this point in the history
Publish jupytext on NPM
  • Loading branch information
martinRenou authored Dec 1, 2020
2 parents 0c748ff + 134bf43 commit bdf4301
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 195 deletions.
195 changes: 0 additions & 195 deletions .github/workflows/continuous-integration.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/publish-jupytext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# https://dev.to/michi/publish-to-npm-automatically-with-github-actions-5805
# https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-nodejs-packages

name: publish-jupytext

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}

- uses: actions/setup-python@v1
with:
python-version: '3.7'

- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@robocorp'

- run: pip install jupyter-packaging jupyterlab==3.0.0.rc10 setuptools wheel

- run: python setup.py bdist_wheel
- run: |
npm ci
git config --global user.name "publish-jupytext"
git config --global user.email "publish-jupytext@example.com"
npm version ${{ github.event.release.tag_name }} --allow-same-version
npm run build
npm publish
working-directory: publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ demo/get_started.ipynb
.history
.vscode/*
!.vscode/*.template

publish/node_modules
Loading

0 comments on commit bdf4301

Please sign in to comment.