on:
  workflow_call

jobs:
  npm:
    runs-on: ubuntu-latest

    steps:
    - name: Download all workflow run artifacts
      uses: actions/download-artifact@v3

    - uses: actions/setup-node@v3
      with:
        registry-url: 'https://registry.npmjs.org'

    - name: npm publish coalesce-vue
      run: npm publish ./coalesce-vue/*.tgz --tag dev --access public
      env:
        NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

    - name: npm publish coalesce-vue-vuetify
      run: for f in ./coalesce-vue-vuetify/*.tgz; do npm publish $f --tag dev --access public; done 
      env:
        NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


  nuget:
    runs-on: ubuntu-latest

    steps:
    - name: Download all workflow run artifacts
      uses: actions/download-artifact@v3

    - name: dotnet nuget push
      run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}
on:
  workflow_call

jobs:
  npm:
    runs-on: ubuntu-latest

    steps:
    - name: Download all workflow run artifacts
      uses: actions/download-artifact@v3

    - uses: actions/setup-node@v3
      with:
        registry-url: 'https://registry.npmjs.org'

    - name: npm publish coalesce-vue
      run: npm publish ./coalesce-vue/*.tgz --tag dev --access public
      env:
        NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

    - name: npm publish coalesce-vue-vuetify
      run: for f in ./coalesce-vue-vuetify/*.tgz; do npm publish $f --tag latest --access public; done 
      env:
        NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


  nuget:
    runs-on: ubuntu-latest

    steps:
    - name: Download all workflow run artifacts
      uses: actions/download-artifact@v3

    - name: dotnet nuget push
      run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}
Switch NPM tag to `latest` so tooling like VS code's package.json version autocomplete works more nicely.
Switch NPM tag to `latest` so tooling like VS code's package.json version autocomplete works more nicely.
