Skip to content

Stream routes can now return viewers via redis #75

Stream routes can now return viewers via redis

Stream routes can now return viewers via redis #75

Workflow file for this run

name: Deployments
on:
push:
branches:
- main
env:
CI: true
jobs:
create-release-pr:
name: Create release pr
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Fetch tags
run: git fetch --tags origin
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Create release pr / create tags
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.HAISHIN_RUNNER_TOKEN }}
with:
version: bun run version-packages
publish: bun run publish-packages
- name: Echo outputs
run: |
echo "hasChangesets=${{ steps.changesets.outputs.hasChangesets }}"
echo "publishedPackages=${{ steps.changesets.outputs.publishedPackages }}"
echo "publishedPackageNames=${{ toJSON(fromJSON(steps.changesets.outputs.publishedPackages).*['name']) }}"
outputs:
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
publishedPackageNames: ${{ toJSON(fromJSON(steps.changesets.outputs.publishedPackages).*['name']) }}
deploy:
needs: create-release-pr
name: Deploy check
runs-on: ubuntu-latest
steps:
- name: Check for changesets
if: needs.create-release-pr.outputs.hasChangesets == 'true'
run: exit 1
- name: Check for published packages
if: |
!(
contains(needs.create-release-pr.outputs.publishedPackageNames, '@haishin/tsconfig') == true ||
contains(needs.create-release-pr.outputs.publishedPackageNames, '@haishin/utils') == true ||
contains(needs.create-release-pr.outputs.publishedPackageNames, '@haishin/backend') == true ||
contains(needs.create-release-pr.outputs.publishedPackageNames, '@haishin/frontend') == true
)
run: exit 1
- name: Deploy
run: exit 0
cleanup-old-release-tags:
needs: create-release-pr
name: Cleanup old release tags
runs-on: ubuntu-latest
continue-on-error: true
if: |
needs.create-release-pr.outputs.hasChangesets == 'false' && needs.create-release-pr.outputs.publishedPackages != '[]'
strategy:
matrix:
package: ${{ fromJSON(needs.create-release-pr.outputs.publishedPackages).*['name'] }}
steps:
- name: 'Delete release tags'
uses: jay2610/[email protected]
with:
keep_latest: 1
delete_tags: true
delete_tag_pattern: ${{ matrix.package }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}