feat!: drop useSlim
and use latest
tag
#7469
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: Build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_VERSION: 18 | |
RENOVATE_VERSION: 35.159.7 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate | |
jobs: | |
commitlint: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Lint commit messages | |
uses: wagoid/commitlint-github-action@456526eec71276a59e74aafdfe06a9632ac2eee1 # v5.4.1 | |
continue-on-error: true | |
lint: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Setup node | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
- name: enable corepack | |
run: corepack enable | |
- name: Install project | |
run: yarn install --frozen-lockfile | |
- name: Lint | |
run: yarn lint | |
e2e: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} | |
strategy: | |
fail-fast: false | |
matrix: | |
configurationFile: [example/renovate-config.js, example/renovate.json] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Setup node | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
- name: enable corepack | |
run: corepack enable | |
- name: Install project | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Configure renovate token | |
run: | | |
if [[ "${RENOVATE_TOKEN}" != "" ]]; then | |
echo "RENOVATE_TOKEN=${RENOVATE_TOKEN}" >> $GITHUB_ENV | |
else | |
echo "RENOVATE_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} | |
- name: Renovate test | |
uses: ./ | |
env: | |
LOG_LEVEL: debug | |
with: | |
configurationFile: ${{ matrix.configurationFile }} | |
renovate-version: ${{ env.RENOVATE_VERSION }} | |
release: | |
needs: [lint, commitlint, e2e] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Git user | |
shell: bash | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
git config --global user.email 'bot@renovateapp.com' | |
git config --global user.name 'Renovate Bot' | |
yarn config set version-git-tag false | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
fetch-depth: 0 | |
ref: 'release' | |
- name: fetch pr | |
if: ${{github.event_name == 'pull_request'}} | |
run: git fetch origin +${{ github.sha }}:${{ github.ref }} | |
- name: Merge main | |
id: merge | |
run: | | |
git merge --no-ff -Xtheirs -m 'skip: merge (${{ github.sha }}) [skip release]' ${{ github.sha }} | |
commit=$(git rev-parse HEAD) | |
- name: Setup node | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
- name: enable corepack | |
run: corepack enable | |
- name: Install project | |
run: yarn install --frozen-lockfile | |
- name: Push release branch | |
run: git push origin release:release | |
if: ${{github.ref == 'refs/heads/main'}} | |
- name: Release | |
run: | | |
# override for semantic-release | |
export GITHUB_REF=refs/heads/release GITHUB_SHA=${{ steps.merge.outputs.commit }} | |
yarn release | |
if: ${{github.ref == 'refs/heads/main'}} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |