-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add first draft of publish workflow - Update lerna config to point to public npm registry - Temporarily add manual workflow trigger
- Loading branch information
Showing
8 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Publish ModelHub Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
id-token: write | ||
|
||
jobs: | ||
verify-and-publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # pulls all history and tags for Lerna to detect which packages changed | ||
|
||
- name: Setup Node 20 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20.x | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install tools and libraries | ||
run: sudo apt-get install -y build-essential libx11-dev libxkbfile-dev libsecret-1-dev | ||
|
||
- name: Use Python 3.11 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install and Build | ||
shell: bash | ||
run: | | ||
yarn global add node-gyp | ||
yarn --skip-integrity-check --network-timeout 100000 | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build example applications | ||
run: | | ||
yarn browser build | ||
yarn electron build | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
|
||
- name: Lint with ESLint | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
# Publish the ModelHub packages. Ignore lifecycle scripts and add verbose logging | ||
# Scripts are ignored because we build and lint before this step | ||
- name: Publish packages | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
yarn lerna publish -y --ignore-scripts --loglevel=verbose | ||
env: | ||
NPM_CONFIG_PROVENANCE: 'true' | ||
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters