Skip to content

Commit

Permalink
Merge pull request #279 from thefrontside/deno-monorepo-publish
Browse files Browse the repository at this point in the history
πŸ§‘β€πŸ’» Migrate to Deno for development
  • Loading branch information
cowboyd authored Sep 17, 2024
2 parents 279cc77 + 430a678 commit cf59935
Show file tree
Hide file tree
Showing 247 changed files with 3,731 additions and 29,968 deletions.
47 changes: 47 additions & 0 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"gitSiteUrl": "https://github.com/thefrontside/interactors/",
"pkgManagers": {
"javascript": {
"version": true,
"getPublishedVersion": "git tag -l \"${ pkg.pkg }-v${ pkgFile.version }\" | sed 's/.*-v//'",
"publish": [
"git tag -a -m \"${ pkg.pkg }-v${ pkgFile.version }\" ${ pkg.pkg }-v${ pkgFile.version }"
]
}
},
"packages": {
"@interactors/globals": {
"path": "./packages/globals/deno.json",
"manager": "javascript"
},
"@interactors/core": {
"path": "./packages/core/deno.json",
"manager": "javascript",
"dependencies": ["@interactors/globals"]
},
"@interactors/keyboard": {
"path": "./packages/keyboard/deno.json",
"manager": "javascript",
"dependencies": ["@interactors/core"]
},
"@interactors/html": {
"path": "./packages/html/deno.json",
"manager": "javascript",
"dependencies": ["@interactors/core"]
},
"@interactors/material-ui": {
"path": "./packages/material-ui/deno.json",
"manager": "javascript",
"dependencies": ["@interactors/html"],
"version": false,
"publish": false
},
"@interactors/with-cypress": {
"path": "./packages/with-cypress",
"manager": "javascript",
"dependencies": ["@interactors/core", "@interactors/globals"],
"version": false,
"publish": false
}
}
}
31 changes: 31 additions & 0 deletions .changes/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changes

##### via https://github.com/jbolda/covector

As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.

When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.

Use the following format:

```md
---
"package-a": patch
"package-b": minor
---

Change summary goes here

```

Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.

Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).

Given a version number MAJOR.MINOR.PATCH, increment the:

- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

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

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/changeset.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/covector-comment-on-form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT

name: covector comment
on:
workflow_run:
workflows: [covector status] # the `name` of the workflow run on `pull_request` running `status` with `comment: true`
types:
- completed

# note all other permissions are set to none if not specified
# and these set the permissions for `secrets.GITHUB_TOKEN`
permissions:
# to read the action artifacts on `covector status` workflows
actions: read
# to write the comment
pull-requests: write

jobs:
download:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' &&
(github.event.workflow_run.head_repository.full_name != github.repository || github.actor == 'dependabot[bot]')
steps:
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "status"
18 changes: 18 additions & 0 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: covector status
on: [pull_request]

jobs:
covector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for use of git history
- name: covector status
uses: jbolda/covector/packages/[email protected]
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'status'
comment: true
47 changes: 47 additions & 0 deletions .github/workflows/covector-version-or-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Version Or Release

on:
push:
branches:
- main

jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65

steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }}
fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
- name: Commit Signing
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.FRONTSIDEJACK_GPG_KEY }}
passphrase: ${{ secrets.FRONTSIDEJACK_GPG_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/[email protected]
id: covector
with:
token: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }}
command: "version-or-publish"
recognizeContributors: true
- name: Create Pull Request With Versions Bumped
uses: peter-evans/create-pull-request@v6
if: steps.covector.outputs.commandRan == 'version'
with:
title: "Publish New Versions"
commit-message: "publish new versions"
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}
- name: Push Git Tags
# through the actions/checkout token, this will use the frontsidejack token
if: steps.covector.outputs.commandRan == 'publish'
run: git push --tags
26 changes: 0 additions & 26 deletions .github/workflows/preview.yml

This file was deleted.

44 changes: 28 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
name: Release
name: Publish

on:
push:
branches:
- main
tags:
- "*-v*"

jobs:
publish-releases:
name: Publish Releases
runs-on: ubuntu-20.04
publish-to-npm:
name: NPM ${{ github.ref }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v3
with:
registry-url: https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v4
- name: setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: volta-cli/action@v4
with:
registry-url: https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Releases
uses: thefrontside/actions/synchronize-with-npm@v2
env:
GITHUB_TOKEN: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }}
- name: Determine Package
id: pkg
run: deno task context-from-git-tag --gitTag ${{ github.ref }}

- name: Generate NPM Packages
run: deno task build:npm ${{ steps.pkg.outputs.working-directory }}

- name: Publish Releases
working-directory: ${{ steps.pkg.outputs.working-directory }}/build/npm
run: npm publish --provenance --access public
env:
GITHUB_TOKEN: ${{ secrets.FRONTSIDEJACK_GITHUB_TOKEN }}
13 changes: 3 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v3
- uses: denoland/setup-deno@v1
with:
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: yarn
- name: Prepack
run: yarn prepack
- name: Lint
run: yarn lint
- name: Test
run: yarn test
deno-version: v1.x
- run: deno test -A
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
yarn-error.log
/packages/*/dist
/packages/*/build
/packages/*/docs
*.tsbuildinfo
.node-version
Expand Down
22 changes: 22 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tasks": {
"build:npm": "deno run -A tasks/build-npm.ts",
"context-from-git-tag": "deno run -A tasks/context-from-git-tag.ts"
},
"workspace": [
"./packages/core",
"./packages/globals",
"./packages/html",
"./packages/keyboard",
"./packages/material-ui"
],
"compilerOptions": {
"lib": ["deno.ns", "esnext", "dom", "dom.iterable", "dom.asynciterable"]
},
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.3"
},
"test": {
"exclude": ["**/sample/*"]
}
}
Loading

0 comments on commit cf59935

Please sign in to comment.