This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Merge pull request #1 from 5minds/feature/email-receiver #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Publish | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| - '*/*' | |
| env: | |
| CI_TOOLS_VERSION: '^5.0.0' | |
| # NOTE: Um den Releasezyklus von Alpha nach Beta zu ändern, einfach die nachfolgend deklarierten Env Variablen switchen. | |
| CI_TOOLS_ALPHA_BRANCH: next | |
| CI_TOOLS_ALPHA_NPM_TAG: next | |
| # CI_TOOLS_BETA_BRANCH: next | |
| # CI_TOOLS_BETA_NPM_TAG: next | |
| BOX_RELEASE_TAG: 2025-1 | |
| jobs: | |
| test: | |
| name: 'Run Tests' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| build_and_publish: | |
| name: 'Build and publish sources' | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: "!(contains(github.actor, 'process-engine-ci') || contains(github.actor, 'admin'))" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install CI Tools | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm i -g @5minds/product_ci_tools@${{ env.CI_TOOLS_VERSION }} | |
| - name: 'Install Dependencies' | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm ci | |
| - name: 'Prepare Version' | |
| if: "!startsWith(github.ref_name, 'renovate')" | |
| run: ci_tools prepare-version --allow-dirty-workdir | |
| - name: 'Commit & Tag Version' | |
| if: "!startsWith(github.ref_name, 'renovate')" | |
| env: | |
| GH_USER: ${{ secrets.GH_USER }} | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: | | |
| ci_tools commit-and-tag-version --only-on-primary-branches | |
| ci_tools update-github-release --only-on-primary-branches --use-title-and-text-from-git-tag | |
| - name: 'Publish Version' | |
| if: "!startsWith(github.ref_name, 'renovate')" | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: ci_tools publish-npm-package --create-tag-from-branch-name | |
| - name: Add Box-Release Tag | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| VERSION="$(ci_tools get-version)" | |
| PACKAGE_NAME="$(npm pkg get name | tr -d \")" | |
| npm dist-tag add $PACKAGE_NAME@$VERSION ${{ env.BOX_RELEASE_TAG }} |