APP-2280 Add @viamrobotics/prime-core package #234
Workflow file for this run
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
name: Continuous integration and deployment | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install π§ | |
uses: ./.github/actions/setup | |
- name: Run lints and checks | |
run: pnpm -r check | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install π§ | |
uses: ./.github/actions/setup | |
- name: Build ποΈ | |
run: pnpm -r build | |
- name: Upload npm artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: npm-dist | |
path: packages/**/dist | |
- name: Upload GitHub Pages artifacts | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: packages/legacy/prime | |
test: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install π§ | |
uses: ./.github/actions/setup | |
with: | |
node-version: 16 | |
- name: Install Playwright Browsers | |
run: pnpm -C packages/legacy playwright-install --with-deps | |
- name: Run tests | |
run: pnpm -r test | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: playwright-report | |
path: packages/legacy/playwright-report/ | |
retention-days: 30 | |
deploy-npm: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Download @viamrobotics/prime npm artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: npm-dist | |
path: packages/legacy/dist | |
- name: Publish @viamrobotics/prime π | |
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # v2.2.1 | |
with: | |
token: "test-token" | |
package: packages/legacy | |
dry-run: true | |
- name: Download @viamrobotics/prime-core npm artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: npm-dist | |
path: packages/core/dist | |
- name: Publish @viamrobotics/prime-core π | |
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # v2.2.1 | |
with: | |
token: "test-token" | |
package: packages/core | |
dry-run: true | |
deploy-pages: | |
if: ${{ github.repository == 'viamrobotics/prime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: [check, build, test] | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |