Skip to content

Commit

Permalink
Spring clean up (#40)
Browse files Browse the repository at this point in the history
* clean up
- bump rescript v11
- change bsconfig.json to rescript.json

* pnpm

* ci

* update rescript/std

* change log

* add contributing

* change log
  • Loading branch information
mununki authored Apr 1, 2024
1 parent dcc14a1 commit acacc50
Show file tree
Hide file tree
Showing 9 changed files with 2,658 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .changeset/poor-yaks-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@greenlabs/garter": patch
---

Spring cleanup

- Upgrade ReScript, std v11
- Using pnpm
33 changes: 33 additions & 0 deletions .github/actions/setup-engines/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Setup engines'
description: 'Setup build toolchains for use in actions'

runs:
using: 'composite'
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: publish

on: [workflow_dispatch]

jobs:
build_test:
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- uses: ./.github/actions/setup-engines

- name: Build
run: pnpm build

- name: Test
run: pnpm test

publish:
needs: [build_test]
name: (only on release) Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-engines

- name: Publish
if: success()
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test

on:
workflow_dispatch:
pull_request:
branches:
- main

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
LANG: en_US.UTF-8

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- uses: ./.github/actions/setup-engines

- name: Build
run: pnpm build

- name: Test
run: pnpm test
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to Green-Labs/Garter
First off, thank you for considering contributing to Garter.

## Ways to Contribute
There are many ways to contribute to Garter, from improving the documentation, submitting bug reports and feature requests, or writing code which can be incorporated into Garter itself.

### Reporting Bugs
Before submitting bug reports, please check the existing reported issues to make sure it hasn't already been reported.
Be as detailed as possible in your report.

### Feature Requests
For feature requests, check the issues to see if it has already been suggested.
Provide a clear and detailed explanation of the feature you would like to see, and why it would be useful.

### Code Contributions
If you would like to contribute code, start by searching through the issues for projects you can tackle.
Fork the repository and make your changes.
Submit a pull request with a clear description of your changes.

### Getting Started
1. Fork the repository on GitHub.
2. Clone your fork to your local machine.
3. Create a new branch for your changes.
4. Make sure your code adheres to the existing coding conventions.
5. Write tests for your changes.
6. Update changelog using changset
```sh
pnpm changeset
```
Pick one of `patch` | `minor` | `major` and write short summary of your changes and commit.

7. Submit a pull request to the main branch.

Thank you for your interest in contributing to Garter. We look forward to your contributions!
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"rescript"
],
"dependencies": {
"@rescript/std": "11.0.0-beta.3"
"@rescript/std": "^11.0.1"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@dusty-phillips/rescript-zora": "^4.0.0",
"onchange": "^7.1.0",
"pta": "^1.2.0",
"rescript": "11.0.0-beta.3",
"rescript": "^11.0.1",
"tap-difflet": "^0.7.2",
"zora": "^5.2.0"
},
Expand All @@ -29,5 +29,5 @@
"test:watch": "onchange --initial '{test,src}/**/*.mjs' -- pta 'test/__tests__/**/*.mjs' | tap-difflet",
"test": "pta './test/__tests__/Index.mjs' | tap-difflet"
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].0"
}
Loading

0 comments on commit acacc50

Please sign in to comment.