Skip to content

ci: run test against different node versions (#626) #460

ci: run test against different node versions (#626)

ci: run test against different node versions (#626) #460

Workflow file for this run

name: Publishment
on:
push:
branches:
- main
jobs:
test:
if: ${{ !contains(github.event.head_commit.message, 'chore(release)') }}
uses: ./.github/workflows/basic-test.yml
e2e-test:
if: ${{ !contains(github.event.head_commit.message, 'chore(release)') }}
uses: ./.github/workflows/e2e-test.yml
backwards-compatibility-test:
uses: ./.github/workflows/backwards-compatibility-test.yml
analysis:
name: SonarCloud Main Analysis
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# Download reports
- uses: ./.github/actions/download-coverage-report
- uses: ./.github/actions/download-lint-report
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_SCANNER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-preliminar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Preliminar Version
run: npx nx version ngx-deploy-npm --dry-run
release:
environment: production
runs-on: ubuntu-latest
needs: [release-preliminar, e2e-test, test, backwards-compatibility-test]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: git config
shell: bash
run: |
git config user.name "Github Actions"
git config user.email "-"
- uses: ./.github/actions/download-build
- name: Check npm credentials
run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Use npx instead of yarn because yarn automagically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
- name: Version and Publishment
run: npx nx version ngx-deploy-npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag last-release
run: git tag --force last-release
- name: Push to protected branch
uses: CasperWA/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}
tags: true
unprotect_reviews: true
force: true