Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release
on:
# v7 maintenance releases are cut by hand (Actions -> Release -> Run workflow) on 7.x.x.
workflow_dispatch:
inputs:
dry_run:
description: "Dry run: compute the release version, publish nothing"
type: boolean
default: true
concurrency:
group: release-${{ github.ref }}
# A new run (a dry run included) waits instead of cancelling a release that may be mid-publish.
cancel-in-progress: false
permissions:
id-token: write # npm trusted publishing (OIDC)
contents: write # release commit, tags, GitHub release
issues: write # @semantic-release/github comments on released issues
pull-requests: write # @semantic-release/github comments on released PRs
jobs:
release:
if: github.ref == 'refs/heads/7.x.x'
# Every run waits for a reviewer's approval, only allowed branches may use this environment,
# and the npm trusted publisher requires it.
environment: npm-release
runs-on: { group: github-public-amd64 }
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node 24.x
uses: actions/setup-node@v7
with:
node-version: 24.x
- name: Install dependencies
run: |
npm ci
- name: Build
run: |
npm run build:prod
- name: Linting
run: |
npm run lint
- name: Unit tests
run: |
npm run test:ci
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release ${{ inputs.dry_run && '--dry-run' || '' }}
24 changes: 9 additions & 15 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
name: Tests and release
name: Tests
on:
push:
branches:
- master
- feat/ngx-translate-v18-support
- 7.x.x
pull_request:
branches:
- master
- 7.x.x
permissions:
id-token: write # Required for OIDC
contents: write # required for committing the version bump
contents: read
jobs:
workflow:
runs-on: ubuntu-latest
runs-on: { group: github-public-amd64 }
strategy:
matrix:
node-version: [24.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -45,13 +43,9 @@ jobs:
- name: Unit tests
run: |
npm run test:ci
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
- name: Deploy sample app to Vercel
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
STREAM_API_KEY: ${{ vars.STREAM_DEMO_API_KEY }}
STREAM_TOKEN_URL: ${{ vars.STREAM_DEMO_TOKEN_URL }}
Expand Down
Loading