Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

# Find all files changes with package*.json
FILES=$(git status --porcelain -- package*.json | awk '{ print $2 }')

for file in $FILES; do
message="Update $file version to $version"
sha=$(git rev-parse "main:$file")
Expand All @@ -76,18 +76,18 @@ jobs:
--field sha="$sha" \
--jq '.commit.sha')
done

# Set up git user info so we can push a tag
# os-botify[bot] GitHub App ID can be found here: https://api.github.com/users/os-botify[bot]
git config --global user.name "os-botify[bot]"
git config --global user.email "140437396+os-botify[bot]@users.noreply.github.com"

# Fetch the commit that was made via the API
git fetch origin main

# Tag new_commit_sha with our new version
git tag -a "$version" "$new_commit_sha" -m "$version"

# Push the new tag
git push origin tag "$version"
env:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/oxfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Oxfmt

on:
workflow_call:
pull_request:
types: [opened, synchronize]
paths:
- '**/*.[tj]s'
- '**/*.?[tj]s'
- '**.yml'
- '**.yaml'
- '.oxfmtrc.json'
- 'package.json'
- 'package-lock.json'
- '.nvmrc'
- '.github/workflows/oxfmt.yml'

jobs:
oxfmt:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
# v7
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0

- name: Setup Node
# v6.4.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package-lock.json

- name: Install npm packages
run: npm ci

- name: Check formatting with Oxfmt
run: npx oxfmt --check .

- name: Tell people how to run the failing check
if: failure()
run: echo "::error::The Oxfmt check failed! Run \`npm run fmt\` from the GitHub-Actions repo root and commit the changes."
14 changes: 7 additions & 7 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
pull_request:
types: [opened, synchronize]
paths:
- "**/*.[tj]s"
- "**/*.?[tj]s"
- "tsconfig.json"
- "package.json"
- "package-lock.json"
- ".nvmrc"
- ".github/workflows/typecheck.yml"
- '**/*.[tj]s'
- '**/*.?[tj]s'
- 'tsconfig.json'
- 'package.json'
- 'package-lock.json'
- '.nvmrc'
- '.github/workflows/typecheck.yml'

jobs:
typecheck:
Expand Down
22 changes: 22 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"arrowParens": "always",
"printWidth": 190,
"singleAttributePerLine": true,
"sortPackageJson": false,
"sortImports": {
"ignoreCase": true
},
"ignorePatterns": ["package.json", "package-lock.json", "*.md", "*.markdown", "dist/**"],
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2
}
}
]
}
Loading
Loading