Skip to content

chore(deps): update dependency @types/node to v20.12.2 #69

chore(deps): update dependency @types/node to v20.12.2

chore(deps): update dependency @types/node to v20.12.2 #69

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
packages: write
pull-requests: write
env:
NODE_VERSION: v21
PKG_NAME: repo-rater.js
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Lint ${{ env.PKG_NAME }}
run: yarn lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Build ${{ env.PKG_NAME }}
run: yarn build
test:
name: Test
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Test ${{ env.PKG_NAME }}
run: yarn test
changelog:
name: Changelog
needs:
- lint
- build
- test
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
outputs:
skipped: ${{ steps.changelog.outputs.skipped }}
tag: ${{ steps.changelog.outputs.tag }}
clean_changelog: ${{ steps.changelog.outputs.clean_changelog }}
version: ${{ steps.changelog.outputs.version }}
env:
PR_BRANCH: release-ci-${{ github.sha }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Create Branch
run: |
git checkout -b ${{ env.PR_BRANCH }}
- name: Create Changelog
uses: TriPSs/conventional-changelog-action@f04dac1fd07687cec8ea302937ca588b33786e98 # v5
id: changelog
with:
github-token: ${{ github.token }}
git-user-name: "github-actions[bot]"
git-user-email: "github-actions[bot]@users.noreply.github.com"
git-branch: ${{ env.PR_BRANCH }}
skip-git-pull: true
output-file: false
create-summary: true
- name: Create Changelog PR
if: steps.changelog.outputs.skipped == 'false'
run: |
gh pr create --base main --head ${{ env.PR_BRANCH }} --title 'chore(release): ${{ steps.changelog.outputs.tag }} [skip-ci]' --body '${{ steps.changelog.outputs.clean_changelog }}'
env:
GH_TOKEN: ${{ github.token }}
- name: Approve Changelog PR
if: steps.changelog.outputs.skipped == 'false'
run: |
gh pr review --approve ${{ env.PR_BRANCH }}
env:
GH_TOKEN: ${{ secrets.GH_OWNER_TOKEN }}
- name: Merge Changelog PR
if: steps.changelog.outputs.skipped == 'false'
run: |
gh pr merge --squash --auto --delete-branch ${{ env.PR_BRANCH }}
env:
GH_TOKEN: ${{ secrets.GH_OWNER_TOKEN }}
release:
name: Release
needs: changelog
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Build ${{ env.PKG_NAME }}
run: yarn build
- name: Create Release
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2
with:
token: ${{ secrets.GH_OWNER_TOKEN }}
tag_name: ${{ needs.changelog.outputs.tag }}
prerelease: false
draft: false
files: |
dist/*
types/*
generate_release_notes: true
name: ${{ needs.changelog.outputs.tag }}
body: |
<details>
<summary>🤖 Autogenerated Conventional Changelog</summary>
${{ needs.changelog.outputs.clean_changelog }}
</details>
publish:
name: Publish Package [NPM]
needs: changelog
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Publish Package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}