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

ci: run ci only once per push and add release-dry-run #90

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
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
35 changes: 31 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Build

on:
- push
- pull_request
- workflow_dispatch
push:
branches:
- master
tags:
- v*
pull_request:
workflow_dispatch:

jobs:
code-quality:
Expand Down Expand Up @@ -132,9 +136,32 @@ jobs:
name: ipyvue-test-results
path: test-results

release-dry-run:
needs: [ test,ui-test,code-quality ]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: ipyvue-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"

- name: Publish the NPM package
run: |
cd js
echo $PRE_RELEASE
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --dry-run --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}
release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [test,ui-test,code-quality]
needs: [release-dry-run]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
Expand Down
Loading