Skip to content

v21.0.0

v21.0.0 #20

Workflow file for this run

# For more information see:
# - https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# - https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
name: release
on:
release:
types:
- created
env:
NODE_VERSION: 22.x
defaults:
run:
shell: bash
concurrency:
group: ${{ github.ref_name }}.${{ github.sha }}.release
cancel-in-progress: true
jobs:
release-build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ env.NODE_VERSION }}
github-ref-name: ${{ github.ref_name }}
github-sha: ${{ github.sha }}
- name: Build NGXS
run: yarn build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: ngxs-build
path: ./@ngxs
retention-days: 1
release-test:
runs-on: ubuntu-latest
needs: release-build
strategy:
matrix:
script: [lint, 'test']
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ env.NODE_VERSION }}
github-ref-name: ${{ github.ref_name }}
github-sha: ${{ github.sha }}
- name: Run ${{ matrix.script }}
run: yarn nx run-many --target=${{ matrix.script }} --configuration=ci --all
- name: Upload coverage results to Qlty
if: ${{ matrix.script == 'test:ci' }}
uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage/packages/**/lcov.info
release-integration-test:
runs-on: ubuntu-latest
needs: release-build
strategy:
matrix:
script:
- 'integration:ng21'
- 'test:types'
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ env.NODE_VERSION }}
github-ref-name: ${{ github.ref_name }}
github-sha: ${{ github.sha }}
- name: Run ${{ matrix.script }}
run: yarn ${{ matrix.script }}
- name: Upload an integration test artifact
if: ${{ startsWith( matrix.script, 'integration:' ) }}
uses: ./.github/actions/upload-integration-test-artifact
with:
script: ${{ matrix.script }}
release-bundlemon:
if: github.repository_owner == 'ngxs'
runs-on: ubuntu-latest
needs: release-integration-test
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ env.NODE_VERSION }}
github-ref-name: ${{ github.ref_name }}
github-sha: ${{ github.sha }}
- name: Download integration test artifacts
uses: ./.github/actions/download-integration-test-artifacts
- name: Run BundleMon (Main)
uses: lironer/bundlemon-action@v1
with:
bundlemon-args: --config .bundlemonrc.json
fail-on-error: false
- name: Run BundleMon (Plugins)
uses: lironer/bundlemon-action@v1
with:
bundlemon-args: --config .bundlemonrc.plugins.json
fail-on-error: false
- name: Run BundleMon (Integration)
uses: lironer/bundlemon-action@v1
with:
bundlemon-args: --config .bundlemonrc.integration.json
fail-on-error: false
release-publish:
if: github.repository_owner == 'ngxs'
runs-on: ubuntu-latest
environment: npm-publish
needs: [release-build, release-test, release-integration-test, release-bundlemon]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ env.NODE_VERSION }}
github-ref-name: ${{ github.ref_name }}
github-sha: ${{ github.sha }}
- name: Check @ngxs build artifacts
uses: ./.github/actions/check-build-artifacts
- name: Production release - publish tagged builds to all @ngxs packages
run: yarn publish:tagged
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}