diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c08ed53..f832cf9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,21 +1,65 @@ -# Reusable workflow for code analysis; to eject, you can replace this file with -# https://github.com/ryansonshine/ryansonshine/blob/main/.github/workflows/codeql-analysis.yml +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# name: "CodeQL" -permissions: - security-events: write - actions: read - contents: read - on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: "36 7 * * 6" + workflow_call: jobs: analyze: - uses: ryansonshine/ryansonshine/.github/workflows/codeql-analysis.yml@main + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["javascript"] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5bd37c9..ae2414c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,9 +1,24 @@ -# Reusable workflow for PRs; to eject, you can replace this file with -# https://github.com/ryansonshine/ryansonshine/blob/main/.github/workflows/pr.yml name: Pull Request -on: [pull_request] +on: + workflow_call: jobs: build: - uses: ryansonshine/ryansonshine/.github/workflows/pr.yml@main + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test + - name: Upload Code Coverage + uses: codecov/codecov-action@v3.1.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81056d8..b0ddd2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,33 @@ -# Reusable workflow for releases; to eject, you can replace this file with -# https://github.com/ryansonshine/ryansonshine/blob/main/.github/workflows/release.yml name: Release on: - push: - branches: - - main + workflow_call: + secrets: + NPM_TOKEN: + required: true + jobs: release: - permissions: - contents: write - issues: write - pull-requests: write - uses: ryansonshine/ryansonshine/.github/workflows/release.yml@main - secrets: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: lts/* + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Test + run: npm test + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release + - name: Upload Code Coverage + uses: codecov/codecov-action@v3.1.0 \ No newline at end of file diff --git a/README.md b/README.md index afd3a5c..68060ea 100644 --- a/README.md +++ b/README.md @@ -46,16 +46,16 @@ Default: `rainbows` Lorem ipsum. -[build-img]:https://github.com/ryansonshine/blurhash-map/actions/workflows/release.yml/badge.svg -[build-url]:https://github.com/ryansonshine/blurhash-map/actions/workflows/release.yml +[build-img]:https://github.com/softberry/blurhash-map/actions/workflows/release.yml/badge.svg +[build-url]:https://github.com/softberry/blurhash-map/actions/workflows/release.yml [downloads-img]:https://img.shields.io/npm/dt/blurhash-map [downloads-url]:https://www.npmtrends.com/blurhash-map [npm-img]:https://img.shields.io/npm/v/blurhash-map [npm-url]:https://www.npmjs.com/package/blurhash-map -[issues-img]:https://img.shields.io/github/issues/ryansonshine/blurhash-map -[issues-url]:https://github.com/ryansonshine/blurhash-map/issues -[codecov-img]:https://codecov.io/gh/ryansonshine/blurhash-map/branch/main/graph/badge.svg -[codecov-url]:https://codecov.io/gh/ryansonshine/blurhash-map +[issues-img]:https://img.shields.io/github/issues/softberry/blurhash-map +[issues-url]:https://github.com/softberry/blurhash-map/issues +[codecov-img]:https://codecov.io/gh/softberry/blurhash-map/branch/main/graph/badge.svg +[codecov-url]:https://codecov.io/gh/softberry/blurhash-map [semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg [semantic-release-url]:https://github.com/semantic-release/semantic-release [commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg diff --git a/package.json b/package.json index 44a75c0..3ec6c14 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,13 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/ryansonshine/blurhash-map.git" + "url": "git+https://github.com/softberry/blurhash-map.git" }, "license": "MIT", "author": { "name": "Emre Sakarya", - "email": "ryansonshine@users.noreply.github.com", - "url": "https://github.com/ryansonshine" + "email": "softberry@users.noreply.github.com", + "url": "https://github.com/softberry" }, "engines": { "node": ">=12.0" @@ -42,9 +42,9 @@ "codecov" ], "bugs": { - "url": "https://github.com/ryansonshine/blurhash-map/issues" + "url": "https://github.com/softberry/blurhash-map/issues" }, - "homepage": "https://github.com/ryansonshine/blurhash-map#readme", + "homepage": "https://github.com/softberry/blurhash-map#readme", "devDependencies": { "@ryansonshine/commitizen": "^4.2.8", "@ryansonshine/cz-conventional-changelog": "^3.3.4",