Add renovate.json (#72) #59
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: Publish Colours | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
fetch-depth: "0" | |
- name: Configure Git User | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "@$GITHUB_ACTOR" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: "https://registry.npmjs.org" | |
scope: "@sardine" | |
- name: "Setup npm" | |
run: | | |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test | |
- name: Publish code coverage | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }} | |
- name: Check types | |
run: npm run types:check | |
- name: Build package | |
run: npm run build | |
- name: Build for unpkg | |
run: npx esbuild ./dist/index.mjs --minify --outfile=./dist/index.min.js | |
- name: Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: npx changeset publish | |
commit: "[ci] release" | |
title: "[ci] release" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |