Skip to content

chore: release (#296) #9

chore: release (#296)

chore: release (#296) #9

Workflow file for this run

name: Publish NPM Package
on:
push:
tags:
- 'moq-web-v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate GitHub token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/setup-node@v4
- name: Update NPM version
run: |
VERSION=${GITHUB_REF#refs/tags/moq-web-v}
jq ".version=\"$VERSION\"" package.json > temp.json && mv temp.json package.json
- name: Authenticate with npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- name: Build/Publish NPM Package
run: |
npm install
npm run build
npm publish --access public
- name: Trigger quic.video update
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
VERSION=${GITHUB_REF#refs/tags/moq-web-v}
curl -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/kixelated/quic.video/actions/workflows/update.yml/dispatches \
-d "$(jq -n --arg version "$VERSION" '{
ref: "main",
inputs: {
npm_version: $version
}
}')"