Skip to content

Commit

Permalink
General Improvements (#70)
Browse files Browse the repository at this point in the history
# General Improvements

> This is a classic @GrantBirki drive-by PR 🚗

This pull request does the following:

- Lightly updates and formats a few existing Actions workflows
- Adds a new `package-check` workflow to validate the contents of the
`dist/` directory have been properly built
- Uses a `.node-version` file so that local development and Actions
remain on the same pinned version of node
- Adds status badges to the readme for visual effect ⭐ 🎨
  • Loading branch information
GrantBirki authored Nov 3, 2023
1 parent eaddb9e commit bb368d6
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: release
"on":

on:
push:
branches:
- main
Expand All @@ -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: ./
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: test

on:
push:
branches:
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.0.0
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
25 changes: 25 additions & 0 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bb368d6

Please sign in to comment.