Skip to content

Commit

Permalink
💚 Update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard committed Nov 27, 2020
1 parent 89a8874 commit 879eecc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: npm-publish

on:
release:
types:
- published
push:
tags:
- "v*.*.*"

jobs:
npm-publish:
Expand All @@ -13,19 +13,23 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Get project version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "$VERSION"
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this release
draft: false
prerelease: false
- uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- run: npm install
- run: npm test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: "v.$VERSION"
env:
VERSION: ${{ env.VERSION }}
tag: ${{ github.ref }}s
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Cache pip on Linux
uses: actions/cache@v1
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python }}
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install --upgrade ".[test]" -v
- name: Run tests
run: |
jupyter nbextension list
jupyter nbextension enable --py --sys-prefix jupyter_pitaya_smoothie
jupyter nbextension enable --py --sys-prefix jupyter-pitaya-smoothie
pip install jupyterlab
jupyter labextension list
jupyter labextension list 2>&1 | grep -q jupyter_pitaya_smoothie
jupyter labextension list 2>&1 | grep -q jupyter-pitaya-smoothie
jupyter labextension link

0 comments on commit 879eecc

Please sign in to comment.