Next Publication #117
This file contains hidden or 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: Publish Release | |
| on: | |
| # Release | |
| release: | |
| types: [released] | |
| # Nightly | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| run-name: >- | |
| ${{ | |
| github.event_name == 'release' && 'Publish Release' | |
| || (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 'Next Publication' | |
| || 'Publish Release' }} | |
| jobs: | |
| publish: | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install OS dependencies | |
| run: | | |
| sudo apt-get update | |
| # Required for USB functionality | |
| sudo apt-get install -y libusb-1.0-0-dev | |
| # Required for Linux udev/device detection | |
| sudo apt-get install -y libudev-dev | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Publish | |
| run: npm publish --access public | |
| env: | |
| NPM_CONFIG_PROVENANCE: "true" | |
| publish-nightly: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install OS dependencies | |
| run: | | |
| sudo apt-get update | |
| # Required for USB functionality | |
| sudo apt-get install -y libusb-1.0-0-dev | |
| # Required for Linux udev/device detection | |
| sudo apt-get install -y libudev-dev | |
| - name: Package next | |
| run: ./scripts/package-next | |
| - name: Publish | |
| run: npm publish --provenance --tag next | |
| env: | |
| NPM_CONFIG_PROVENANCE: "true" |