Skip to content

Commit

Permalink
Merge branch 'main' into dependabot-alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
JAHMCR authored Jul 31, 2024
2 parents a015e03 + 606f2de commit 2c6bb2e
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]
node: [ 18 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,35 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
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.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# 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
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
13 changes: 8 additions & 5 deletions .github/workflows/deploy_cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ on:
jobs:
Deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PACKAGE_NAME: '@ibm-aspera/connect-sdk-js'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 14
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci
Expand All @@ -27,7 +30,7 @@ jobs:
run: npm run build

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ on:
jobs:
Documentation:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: |
Expand All @@ -20,8 +28,20 @@ jobs:
npm run build
npm run docs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.2
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
branch: gh-pages
folder: dist/docs
path: dist/docs
Deploy:
needs: Documentation
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
13 changes: 8 additions & 5 deletions .github/workflows/npm_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ on:
jobs:
Publish:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 14
node-version: ${{ matrix.node }}

- name: Install dependencies
run: |
Expand All @@ -25,7 +28,7 @@ jobs:
npm run build
- name: Publish
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.NPM_TOKEN }}
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ on:
jobs:
Release:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }} # Needed to properly trigger workflow events

Expand All @@ -22,6 +25,11 @@ jobs:
git config user.name github-actions
git config user.email github-actions@github.com
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Bump version
run: |
npm run release -- --release-as ${{ env.RELEASE_VERSION }} --no-verify --skip.changelog
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/whitesource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Run Whitesource Action
uses: TheAxZim/Whitesource-Scan-Action@v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy-cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ const bucketPath = `${bucketName}/${packageName}/${tagName}`;

// Sync to s3 and invalidate
const syncCommand = `aws s3 sync . s3://${bucketPath} --delete --acl public-read`
const invalidationCommand = `aws cloudfront create-invalidation --distribution-id ${distId} --paths ${bucketPath}/*`
const invalidationCommand = `aws cloudfront create-invalidation --distribution-id ${distId} --paths /${packageName}/${tagName}/*`
execSync(syncCommand, { stdio: 'inherit', cwd: folder });
execSync(invalidationCommand, { stdio: 'inherit', cwd: folder });

0 comments on commit 2c6bb2e

Please sign in to comment.