deps: update dependency conventional-changelog-writer to v6 - autoclosed #2035
Workflow file for this run
This file contains 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: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CI: 1 | |
ARTIFACT_DIR: ./artifacts | |
jobs: | |
commit-watch: | |
name: Run Commit Watch | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
- name: Run Commit Watch | |
env: | |
COMMIT_WATCH_OUTPUT_DIR: ${{ env.ARTIFACT_DIR }}/ | |
COMMITWATCH_GITHUB_TOKEN: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | |
CI_REPO_OWNER: ${{ github.repository_owner }} | |
CI_REPO_NAME: ${{ github.event.repository.name }} | |
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | |
CI_BASE_BRANCH: origin/${{ github.base_ref }} | |
run: yarn dlx commit-watch | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: commit-watch-artifacts | |
path: ${{ env.ARTIFACT_DIR }} | |
tests: | |
name: Lint & Tests | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
- name: Validate Constraints | |
run: yarn constraints | |
- name: Build | |
run: yarn build | |
- name: Linting | |
run: yarn lint:ci | |
- name: Set GitHub user for tests | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Top Hat Open Source" | |
git config --global init.defaultBranch main | |
- name: Tests | |
run: yarn test:ci | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-unit-tests | |
path: ./raw-coverage/jest | |
tests_e2es: | |
name: Tests - End to End - ${{ matrix.runner }} | |
runs-on: ${{ matrix.runner}} | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
matrix: | |
runner: ['ubuntu-latest'] | |
env: | |
E2E: 1 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
with: | |
cache-prefix: ${{ matrix.runner }} | |
- name: Build Registry Dockerfile | |
run: yarn workspace @monodeploy/e2e-tests test:registry:build | |
- name: Run Tests | |
run: yarn test:e2e | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ matrix.runner }} == 'ubuntu-latest' | |
with: | |
name: coverage-e2e-tests | |
path: ./raw-coverage/jest-e2es | |
test_report: | |
name: Test Report | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
needs: ['tests_e2es', 'tests'] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
- name: Download Unit Test Coverage | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage-unit-tests | |
path: ./raw-coverage/jest | |
- name: Download E2E Coverage | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage-e2e-tests | |
path: ./raw-coverage/jest-e2es | |
- name: Log Coverage Files (Jest Unit) | |
run: ls -la ./raw-coverage/jest | |
- name: Log Coverage Files (Jest E2Es) | |
run: ls -la ./raw-coverage/jest-e2es | |
- name: Merge Coverage | |
run: yarn test:coverage:merge | |
- name: Generate Report | |
run: yarn test:coverage:report | |
- name: Upload Coverage Report | |
run: ./.github/codecov.sh $GITHUB_EVENT_PATH | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
tests_compatibility: | |
name: Test Compatibility - ${{ matrix.runner }} / Node ${{ matrix.node-version }} | |
runs-on: ${{ matrix.runner}} | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
matrix: | |
runner: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
node-version: ['lts/gallium'] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache-prefix: ${{ matrix.runner }} | |
- name: Build | |
run: yarn build | |
- name: Set GitHub user for tests | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Top Hat Open Source" | |
git config --global init.defaultBranch main | |
- name: Tests | |
run: yarn test:ci | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: report-artifacts | |
path: ${{ env.ARTIFACT_DIR }} | |
publish_preview: | |
name: Publish Preview | |
runs-on: ubuntu-latest | |
needs: [test_report] | |
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
- name: Build | |
run: yarn build | |
- name: Run Monodeploy in Dry Run Mode | |
id: run-monodeploy | |
run: | | |
echo "<!-- MONODEPLOY:BELOW -->" > ${{ env.ARTIFACT_DIR }}/CHANGELOG.md | |
yarn run-local \ | |
--dry-run \ | |
--log-level 0 \ | |
--git-base-branch origin/${{ github.base_ref }} \ | |
--conventional-changelog-config @tophat/conventional-changelog-config \ | |
--changelog-filename ${{ env.ARTIFACT_DIR }}/CHANGELOG.md \ | |
--force-write-change-files \ | |
--changeset-ignore-patterns '**/*.test.ts' \ | |
--package-group-manifest-field group | |
changelog_body=$(cat ${{ env.ARTIFACT_DIR }}/CHANGELOG.md) | |
changelog_body="${changelog_body//'%'/'%25'}" | |
changelog_body="${changelog_body//$'\n'/'%0A'}" | |
changelog_body="${changelog_body//$'\r'/'%0D'}" | |
echo ::set-output name=changelog::$changelog_body | |
- name: Check for Changelog Comment | |
uses: peter-evans/find-comment@v2 | |
id: found-comment | |
if: github.event_name == 'pull_request' | |
with: | |
token: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'tophat-opensource-bot' | |
body-includes: <!-- MONODEPLOY_CHANGELOG_PREVIEW --> | |
- name: Post Changelog to PR | |
uses: peter-evans/create-or-update-comment@v3 | |
if: github.event_name == 'pull_request' | |
with: | |
token: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | |
comment-id: ${{ steps.found-comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
edit-mode: replace | |
body: | | |
<!-- MONODEPLOY_CHANGELOG_PREVIEW --> | |
# Monodeploy Publish Preview | |
This Pull Request introduces the following changes: | |
${{ steps.run-monodeploy.outputs.changelog }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: ${{ env.ARTIFACT_DIR }} | |
website: | |
name: Website | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
needs: [test_report] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
token: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-env | |
- name: Build Website | |
if: "github.event_name == 'pull_request'" | |
run: yarn docs | |
- name: Build & Deploy Website | |
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" | |
run: | | |
git checkout gh-pages | |
git reset --hard main | |
yarn docs | |
git add docs | |
git commit -m "chore: update website" -n | |
git push --force origin gh-pages |