Skip to content

Commit

Permalink
Merge pull request #16 from github/general-updates
Browse files Browse the repository at this point in the history
workflow and vercel/ncc updates
  • Loading branch information
GrantBirki committed Apr 12, 2023
2 parents c899690 + c3eca14 commit 033a375
Show file tree
Hide file tree
Showing 12 changed files with 1,444 additions and 1,154 deletions.
File renamed without changes.
6 changes: 1 addition & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@ jobs:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# 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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Need to checkout for testing the Action in this repo
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3

# Lock or Unlock via a comment (ex: .lock or .unlock)
- uses: ./
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@ on:
- main
- 'releases/*'

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3
- name: setup node
uses: actions/setup-node@v3.6.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Need to checkout for testing the Action in this repo
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# Lock
- uses: ./
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/package-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,36 @@ on:
- "**.md"
workflow_dispatch:

permissions:
contents: read

jobs:
package-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- name: Setup Node.js 18.x
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
- name: setup node
uses: actions/setup-node@v3.6.0
with:
node-version: 18.x
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: Install dependencies
- name: install dependencies
run: npm ci

- name: Rebuild the dist/ directory
- name: rebuild the dist/ directory
run: npm run bundle

- name: Compare the expected and actual dist/ directories
- name: compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@ on:
- main
- 'releases/*'

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # pin@v3
- name: setup node
uses: actions/setup-node@v3.6.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unlock-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Need to checkout for testing the Action in this repo
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- uses: actions/checkout@v3.5.0

# Lock
- uses: ./
Expand Down
111 changes: 108 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 033a375

Please sign in to comment.