Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenjie-Shao committed Mar 7, 2024
1 parent 970eb9e commit 414f7ee
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Node.js Package

on:
release:
types:
- created

jobs:
publish:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
dirName: ['dsbridge', 'hls.js', 'viewport-units-buggyfill', 'anonymous-token']

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: '@adrise'

- run: npm set-script prepare ""
if: ${{ matrix.dirName == 'hls.js' }} # currently only hls.js has the husky config
working-directory: packages/${{ matrix.dirName }}

- run: npm install ci --legacy-peer-deps
if: ${{ matrix.dirName == 'hls.js' || matrix.dirName == 'anonymous-token' }} # currently only hls.js and anonymous-token migrated the build command
working-directory: packages/${{ matrix.dirName }}

- run: npm run build
if: ${{ matrix.dirName == 'hls.js' || matrix.dirName == 'anonymous-token' }} # currently only hls.js and anonymous-token migrated the build command
working-directory: packages/${{ matrix.dirName }}

- run: npm publish
working-directory: packages/${{ matrix.dirName }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 414f7ee

Please sign in to comment.