Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve ci #10

Merged
merged 4 commits into from
Feb 5, 2024
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
40 changes: 40 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releaseCreated: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: catapulta-verify
pull-request-header: "I have created a release"

release-node:
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.releaseCreated }}
needs:
- release-please
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Publish
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
23 changes: 19 additions & 4 deletions .github/workflows/actions.yaml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
name: CI
on: [push]
name: Test and lint

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
push:
branches:
- master

jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: biomejs/setup-biome@v1
- name: Install dependencies
run: bun install
- name: Lint check
run: biome ci .
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
Binary file modified bun.lockb
Binary file not shown.
72 changes: 37 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
{
"name": "catapulta-verify",
"version": "0.1.13",
"author": "@kartojal <[email protected]> (https://catapulta.sh/)",
"repository": "github:catapulta-sh/catapulta-verify",
"main": "./out/index.mjs",
"devDependencies": {
"@biomejs/biome": "1.4.1",
"@types/chalk": "^2.2.0",
"bun-types": "latest",
"chalk": "^5.3.0",
"dotenv": "^16.3.1",
"ts-command-line-args": "^2.5.1"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"bin": {
"catapulta-verify": "./out/index.mjs"
},
"bugs": {
"url": "https://github.com/catapulta-sh/catapulta-verify/issues",
"email": "[email protected]"
},
"files": [
"out/index.mjs"
],
"homepage": "https://github.com/catapulta-sh/catapulta-verify#readme",
"license": "MIT",
"scripts": {
"build": "bun build ./src/index.ts --outfile=out/index.mjs --target node",
"postbuild": "bunx rexreplace '^(#!.+\\n)?' '$1import { createRequire as createImportMetaRequire } from \"module\"; import.meta.require ||= (id) => createImportMetaRequire(import.meta.url)(id);\\n' -GM out/index.mjs",
"lint:fix": "bunx @biomejs/biome check ./ --apply",
"lint": "bunx @biomejs/biome check ./"
}
}
"name": "catapulta-verify",
"version": "0.1.13",
"author": "@kartojal <[email protected]> (https://catapulta.sh/)",
"repository": "github:catapulta-sh/catapulta-verify",
"main": "./out/index.mjs",
"private": false,
"publishConfig": {
"access": "public"
},
"files": ["out/index.mjs"],
"devDependencies": {
"@biomejs/biome": "1.4.1",
"@types/chalk": "^2.2.0",
"bun-types": "latest",
"chalk": "^5.3.0",
"dotenv": "^16.3.1",
"ts-command-line-args": "^2.5.1"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"bin": {
"catapulta-verify": "./out/index.mjs"
},
"bugs": {
"url": "https://github.com/catapulta-sh/catapulta-verify/issues",
"email": "[email protected]"
},
"homepage": "https://github.com/catapulta-sh/catapulta-verify#readme",
"license": "MIT",
"scripts": {
"build": "bun build ./src/index.ts --outfile=out/index.mjs --target node",
"postbuild": "bunx rexreplace '^(#!.+\\n)?' '$1import { createRequire as createImportMetaRequire } from \"module\"; import.meta.require ||= (id) => createImportMetaRequire(import.meta.url)(id);\\n' -GM out/index.mjs",
"lint:fix": "bunx @biomejs/biome check ./ --apply",
"lint": "bunx @biomejs/biome check ./"
}
}