Skip to content

Commit

Permalink
Merge pull request #61 from thefrontside/swap-to-covector
Browse files Browse the repository at this point in the history
swap to covector for releases
  • Loading branch information
jbolda authored Jul 13, 2024
2 parents 1717088 + 62701e3 commit 41240cb
Show file tree
Hide file tree
Showing 12 changed files with 3,510 additions and 3,114 deletions.
File renamed without changes.
41 changes: 41 additions & 0 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"gitSiteUrl": "https://github.com/thefrontside/javascript/",
"pkgManagers": {
"javascript": {
"version": true,
"getPublishedVersion": {
"use": "fetch:check",
"options": {
"url": "https://registry.npmjs.com/${ pkg.pkg }/${ pkg.pkgFile.version }"
}
},
"publish": [
"npm publish --provenance --access public"
]
}
},
"packages": {
"@frontside/eslint-config": {
"path": "./packages/eslint-config",
"manager": "javascript",
"dependencies": [
"eslint-plugin-prefer-let"
]
},
"eslint-plugin-prefer-let": {
"path": "./packages/eslint-plugin-prefer-let",
"manager": "javascript"
},
"@frontside/tsconfig": {
"path": "./packages/tsconfig",
"manager": "javascript"
},
"@frontside/typescript": {
"path": "./packages/typescript",
"manager": "javascript",
"dependencies": [
"@frontside/tsconfig"
]
}
}
}
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).
9 changes: 0 additions & 9 deletions .changeset/config.json

This file was deleted.

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

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/covector-comment-on-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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/action@covector-v0
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "status"
comment: true
60 changes: 60 additions & 0 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: version or publish

on:
push:
branches:
- v*

permissions:
# required for npm provenance
id-token: write
# required to create the GitHub Release
contents: write
# required for creating the Version Packages Release
pull-requests: write

jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for use of git history
- uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
- uses: volta-cli/action@v4
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "version-or-publish"
createRelease: true
recognizeContributors: true
- name: sync lockfile
if: steps.covector.outputs.commandRan == 'version'
run: yarn install
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v6
if: steps.covector.outputs.commandRan == 'version'
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Publish New Versions"
commit-message: "publish new versions"
labels: "version updates"
branch: "release"
body: ${{ steps.covector.outputs.change }}
24 changes: 0 additions & 24 deletions .github/workflows/preview.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test": "yarn workspaces foreach --all run test"
},
"devDependencies": {
"@changesets/cli": "^2.17.0"
"covector": "^0.12.0"
},
"volta": {
"node": "20.12.2",
Expand Down
Loading

0 comments on commit 41240cb

Please sign in to comment.