add working directory to node setup and yarn install #24
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: | ||
jobs: | ||
package: | ||
name: Package app for ${{ matrix.job.name }} | ||
env: | ||
NUXT_PUBLIC_VERSION: ${{ inputs.version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- { name: 'Ubuntu x64', os: 'ubuntu-22.04', arch: X64 } | ||
runs-on: ['self-hosted', '${{ matrix.job.os }}', '${{ matrix.job.arch }}'] | ||
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 | ||
working-directory: zenoh-ts | ||
Check failure on line 48 in .github/workflows/package.yaml GitHub Actions / Package zenoh-tsInvalid workflow file
|
||
with: | ||
node-version: 20 | ||
registry-url: https://npm.pkg.github.com/ | ||
- name: Run install | ||
uses: borales/actions-yarn@v4 | ||
working-directory: zenoh-ts | ||
with: | ||
cmd: install | ||
- name: transpile code | ||
working-directory: zenoh-ts | ||
run: yarn run build | ||
- name: Publish | ||
id: publish | ||
shell: bash | ||
working-directory: zenoh-ts | ||
env: | ||
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: | | ||
npm install | ||
npx release-it | ||
- name: Cleanup | ||
working-directory: zenoh-ts | ||
if: always() | ||
run: | | ||
rm -rf node_modules | ||
rm -rf dist | ||
rm -rf package-lock.json |