Skip to content

Commit

Permalink
Update npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Mar 17, 2024
1 parent 5b464ee commit 0df7999
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
name: Build Conda Package
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- name: Fetch unshallow
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
fetch-depth: "100"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@v4
Expand All @@ -128,7 +128,7 @@ jobs:
runs-on: "ubuntu-latest"
needs: [pip_build]
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -161,10 +161,10 @@ jobs:
name: Build NPM Package
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@v4
Expand All @@ -180,9 +180,11 @@ jobs:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_API_TOKEN }}" > $HOME/.npmrc
npm whoami
npm -v
- name: npm build
- name: package install
run: |
python -m pip install -ve .
- name: npm build
run: |
cd ./panel
TARBALL=$(npm pack .)
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
Expand All @@ -207,20 +209,23 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set name
- name: Set environment variables
run: |
TARBALL=$(ls *.tgz)
echo $TARBALL
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "TARBALL=$(ls *.tgz)" >> $GITHUB_ENV
- name: npm dev deploy
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')
run: |
# npm publish --tag dev $TARBALL
echo $TARBALL
echo $TAG
ls
- name: npm main deploy
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')))
run: |
# npm publish --tag latest $TARBALL
echo $TARBALL
echo $TAG
ls
# cdn:
Expand All @@ -238,7 +243,7 @@ jobs:
# - uses: actions/checkout@v3
# with:
# fetch-depth: "100"
# - uses: actions/setup-python@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - uses: actions/setup-node@v4
Expand Down

0 comments on commit 0df7999

Please sign in to comment.