build: Sync with eclipse-zenoh/zenoh@bb24e95 from 2024-10-31 (#9) #9
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: Package zenoh-ts | |
on: | |
workflow_dispatch: | |
inputs: | |
publish: | |
description: 'Publish artifacts' | |
default: false | |
required: false | |
type: boolean | |
version: | |
description: 'Library version' | |
required: false | |
default: '0.0.1' | |
type: string | |
zenoh_version: | |
description: 'Zenoh version' | |
required: true | |
type: string | |
default: '1.0.0-alpha.6' | |
push: | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./zenoh-ts | |
jobs: | |
package: | |
name: Package app for ${{ matrix.job.name }} | |
env: | |
NUXT_PUBLIC_VERSION: ${{ inputs.version }} | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: git config | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://npm.pkg.github.com/ | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
dir: ./zenoh-ts | |
- name: Transpile Code | |
run: yarn run build | |
- name: Publish | |
id: publish | |
shell: bash | |
env: | |
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
npm install | |
npx release-it | |
- name: Cleanup | |
if: always() | |
run: | | |
rm -rf node_modules | |
rm -rf dist | |
rm -rf package-lock.json |