Skip to content

release: 13.3.3

release: 13.3.3 #107

Workflow file for this run

# Publishes a GitHub release and NPM package for
# any tag that is pushed to the repository.
# Tags should be generated automatically by
# manually running the "release" workflow.
name: Publish
on:
push:
branches:
- 13-stable
jobs:
publish:
if: ${{ startsWith(github.event.head_commit.message, 'release:') }}
runs-on: ubuntu-latest
steps:
- uses: extractions/setup-just@v1
- uses: actions/checkout@v4
- name: Extract version number
id: vars
run: echo ::set-output name=version::v$(jq -r .version package.json)
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
registry-url: 'https://registry.npmjs.org'
- name: Build
env:
CYPRESS_INSTALL_BINARY: 0
run: |
just install
just build
- name: Release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # provided by Actions
with:
tag_name: ${{ steps.vars.outputs.version }}
release_name: Release ${{ steps.vars.outputs.version }}
body_path: CHANGELOG.md
draft: false
prerelease: false
- name: Upload media-stream-library
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: streams/dist/media-stream-library.min.js
asset_name: media-stream-library.min.js
asset_content_type: application/javascript
- name: Upload media-stream-player
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: player/dist/media-stream-player.min.js
asset_name: media-stream-player.min.js
asset_content_type: application/javascript
- name: Upload media-overlay-library
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: overlay/dist/media-overlay-library.min.js
asset_name: media-overlay-library.min.js
asset_content_type: application/javascript
- name: Deploy NPM packages
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
if [[ $GITHUB_REF =~ alpha|beta ]]; then
yarn workspaces foreach --no-private npm publish --tag next
else
yarn workspaces foreach --no-private npm publish --tag latest
fi