Skip to content

Commit

Permalink
feat: update dependencies, include sourcemaps, update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
samialdury committed Aug 6, 2023
1 parent b333298 commit ddcd543
Show file tree
Hide file tree
Showing 21 changed files with 2,078 additions and 1,419 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.cjs

This file was deleted.

16 changes: 12 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@
"config:js-lib",
":semanticCommits",
":timezone(Europe/Prague)",
"schedule:monthly",
"schedule:earlyMondays",
":disableRateLimiting",
":label(dependencies)",
":separateMultipleMajorReleases",
"npm:unpublishSafe",
":separateMultipleMajorReleases",
"group:allNonMajor",
"group:definitelyTyped",
"group:jsTestNonMajor",
"group:linters",
":reviewer(samialdury)"
":automergePr",
":automergeRequireAllStatusChecks",
":automergeDigest",
":automergeMinor",
":automergePatch",
":automergeLinters",
":automergeTesters",
":automergeTypes"
],
"platformCommit": true
"platformCommit": true,
"platformAutomerge": true
}
23 changes: 14 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ env:

jobs:
check:
runs-on: ubuntu-22.04
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -44,27 +44,32 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm

- name: Install NPM dependencies
- name: Install npm dependencies
timeout-minutes: 2
run: |
pnpm install --frozen-lockfile
make install-ci
- name: Check TypeScript
timeout-minutes: 2
run: |
pnpm typecheck
make typecheck
- name: Bundle TypeScript
timeout-minutes: 2
run: |
pnpm build
make build
- name: Run tests
timeout-minutes: 2
run: |
pnpm test:ci
make test-ci
- name: Check formatting & lint
- name: Check formatting
timeout-minutes: 2
run: |
pnpm lint:ci
make format-ci
- name: Check lint errors
timeout-minutes: 2
run: |
make lint-ci
68 changes: 54 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Release

on:
workflow_dispatch:
push:
branches:
- 'main'
inputs:
acknowledge:
description: 'I understand that this action will publish a new NPM & GitHub release.'
required: true
type: boolean

concurrency: release-${{ github.ref_name }}

Expand All @@ -14,12 +16,32 @@ env:

jobs:
release:
runs-on: ubuntu-22.04
if: startsWith(github.event.head_commit.message, 'chore(release):')
name: Release
if: ${{ inputs.acknowledge }}
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
timeout-minutes: 2
with:
token: ${{ secrets.BOT_PAT }}

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_config_global: true
git_commit_gpgsign: true
git_tag_gpgsign: false
git_push_gpgsign: false
git_committer_name: ${{ secrets.BOT_USERNAME }}
git_committer_email: ${{ secrets.BOT_EMAIL }}

- name: Set up pnpm
uses: pnpm/action-setup@v2
Expand All @@ -35,21 +57,39 @@ jobs:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install NPM dependencies
- name: Get pnpm store directory
id: pnpm-store
timeout-minutes: 2
run: |
pnpm install --frozen-lockfile
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Restore pnpm cache
uses: actions/cache@v3
timeout-minutes: 2
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-${{ env.PNPM_VERSION }}-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-${{ env.PNPM_VERSION }}-store-
- name: Build TypeScript
- name: Install npm dependencies
timeout-minutes: 2
run: |
pnpm build
make install-ci
- name: Create GitHub release and publish to NPM
uses: changesets/action@v1
- name: Bundle TypeScript
timeout-minutes: 2
run: |
make build
- name: Release to NPM & GitHub
timeout-minutes: 2
run: |
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
publish: pnpm release
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
GIT_AUTHOR_NAME: ${{ secrets.BOT_USERNAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.BOT_USERNAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}
54 changes: 0 additions & 54 deletions .github/workflows/version.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions CHANGELOG.md

This file was deleted.

0 comments on commit ddcd543

Please sign in to comment.