Skip to content

Update package.json #38

Update package.json

Update package.json #38

name: websockets-release

Check failure on line 1 in .github/workflows/websockets-release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/websockets-release.yaml

Invalid workflow file

you may only define one of `paths` and `paths-ignore` for a single event
on:
push:
branches:
- main
paths:
- websockets/**
paths-ignore:
- websockets/package-lock.json
jobs:
build-websockets:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: websockets
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install --include=dev
working-directory: websockets
- name: Test
run: wing test
working-directory: websockets
- name: Pack
run: wing pack
working-directory: websockets
- name: Get package version
run: echo WINGLIB_VERSION=$(node -p "require('./package.json').version") >>
"$GITHUB_ENV"
working-directory: websockets
- name: Publish
run: npm publish --access=public --registry https://registry.npmjs.org --tag
latest *.tgz
working-directory: websockets
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag commit
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
tag: websockets-v${{ env.WINGLIB_VERSION }}
- name: GitHub release
uses: softprops/action-gh-release@v1
with:
name: websockets v${{ env.WINGLIB_VERSION }}
tag_name: websockets-v${{ env.WINGLIB_VERSION }}
files: "*.tgz"
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}