diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d487c79..dbce170 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ name: release -"on": + +on: push: branches: - main @@ -18,10 +19,12 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false + - uses: actions/setup-node@v4 with: - node-version: 20 - cache: "npm" + node-version-file: .node-version + cache: 'npm' + - run: npm ci - run: npm run build - uses: ./ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48fbfef..40ec55b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,5 @@ name: test + on: push: branches: @@ -15,10 +16,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 - cache: "npm" + node-version-file: .node-version + cache: 'npm' + - run: npm ci - run: npm test diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..e88320d --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.0.0 diff --git a/README.md b/README.md index a1de0c6..1f122ed 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Create GitHub App Token +[![test](https://github.com/actions/create-github-app-token/actions/workflows/test.yml/badge.svg)](https://github.com/actions/create-github-app-token/actions/workflows/test.yml) + GitHub Action for creating a GitHub App installation access token. ## Usage @@ -46,7 +48,7 @@ jobs: # required app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.PRIVATE_KEY }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ steps.app-token.outputs.token }} ref: ${{ github.head_ref }} diff --git a/badges/coverage.svg b/badges/coverage.svg new file mode 100644 index 0000000..5c93d2c --- /dev/null +++ b/badges/coverage.svg @@ -0,0 +1,25 @@ + + Coverage: 100% + + + + + + + + + + + + + + + Coverage + + 100% + + diff --git a/package-lock.json b/package-lock.json index da3ae85..5bf8b49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "create-github-app-token", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "create-github-app-token", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index 1e35a78..a9f1578 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "version": "1.5.1", "description": "GitHub Action for creating a GitHub App Installation Access Token", "scripts": { - "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node16.16", + "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0", "test": "c8 --100 ava tests/index.js", "coverage": "c8 report --reporter html", "postcoverage": "open-cli coverage/index.html"