peers/peerjs-server

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release
on:
  push:
    branches:
      - rc
      - stable
jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "lts/*"
      - name: Install dependencies
        run: npm ci
      - name: Build
        run: npm run build
      - name: Import GPG key
        id: import_gpg
        uses: crazy-max/ghaction-import-gpg@v5
        with:
          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.GPG_PASSPHRASE }}
          git_user_signingkey: true
          git_commit_gpgsign: true
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }}
          GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }}
          DOCKER_REGISTRY_USER: ${{ secrets.DOCKERHUB_USERNAME }}
          DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
        run: npx semantic-release