Udate workflows
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
actions-minor:
|
||||||
|
update-types:
|
||||||
|
- minor
|
||||||
|
- patch
|
||||||
|
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
ignore:
|
||||||
|
- dependency-name: '@types/node'
|
||||||
|
update-types:
|
||||||
|
- 'version-update:semver-major'
|
||||||
|
groups:
|
||||||
|
npm-development:
|
||||||
|
dependency-type: development
|
||||||
|
update-types:
|
||||||
|
- minor
|
||||||
|
- patch
|
||||||
|
npm-production:
|
||||||
|
dependency-type: production
|
||||||
|
update-types:
|
||||||
|
- patch
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# In TypeScript actions, `dist/` is a special directory. When you reference
|
||||||
|
# an action with the `uses:` property, `dist/index.js` is the code that will be
|
||||||
|
# run. For this project, the `dist/index.js` file is transpiled from other
|
||||||
|
# source files. This workflow ensures the `dist/` directory contains the
|
||||||
|
# expected transpiled code.
|
||||||
|
#
|
||||||
|
# If this workflow is run from a feature branch, it will act as an additional CI
|
||||||
|
# check and fail if the checked-in `dist/` directory does not match what is
|
||||||
|
# expected from the build.
|
||||||
|
name: Check Transpiled JavaScript
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-dist:
|
||||||
|
name: Check dist/
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
id: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
id: setup-node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
id: install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build dist/ Directory
|
||||||
|
id: build
|
||||||
|
run: npm run bundle
|
||||||
|
|
||||||
|
# This will fail the workflow if the `dist/` directory is different than
|
||||||
|
# expected.
|
||||||
|
- name: Compare Directories
|
||||||
|
id: diff
|
||||||
|
run: |
|
||||||
|
if [ ! -d dist/ ]; then
|
||||||
|
echo "Expected dist/ directory does not exist. See status below:"
|
||||||
|
ls -la ./
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
|
||||||
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
|
git diff --ignore-space-at-eol --text dist/
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If `dist/` was different than expected, upload the expected version as a
|
||||||
|
# workflow artifact.
|
||||||
|
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
|
||||||
|
name: Upload Artifact
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist/
|
||||||
@@ -1,71 +1,48 @@
|
|||||||
# For most projects, this workflow file will not need changing; you simply need
|
name: CodeQL
|
||||||
# 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"
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
branches:
|
||||||
branches: [ main ]
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '31 5 * * 5'
|
- cron: '31 7 * * 3'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
checks: write
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'javascript' ]
|
language:
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
- TypeScript
|
||||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
id: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
- name: Initialize CodeQL
|
||||||
- name: Initialize CodeQL
|
id: initialize
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
source-root: src
|
source-root: src
|
||||||
# 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).
|
- name: Autobuild
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
id: autobuild
|
||||||
- name: Autobuild
|
uses: github/codeql-action/autobuild@v3
|
||||||
uses: github/codeql-action/autobuild@v2
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
- name: Perform CodeQL Analysis
|
||||||
# 📚 https://git.io/JvXDl
|
id: analyze
|
||||||
|
uses: github/codeql-action/analyze@v3
|
||||||
# ✏️ 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
|
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
name: Continuous Integration
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
continuous-integration:
|
||||||
|
name: Continuous Integration
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
id: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
id: setup-node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
id: install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Check Format
|
||||||
|
id: format-check
|
||||||
|
run: npm run format:check
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
id: lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
id: test
|
||||||
|
run: npm run ci-test
|
||||||
@@ -1,18 +1,22 @@
|
|||||||
name: first-interaction
|
name: First Interaction
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types:
|
||||||
|
- opened
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches:
|
||||||
types: [opened]
|
- main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_for_first_interaction:
|
first-interaction:
|
||||||
|
name: First Interaction
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/first-interaction@v2
|
||||||
- uses: actions/first-interaction@main
|
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-message: |
|
issue-message: |
|
||||||
@@ -25,4 +29,3 @@ jobs:
|
|||||||
If you are fixing a bug, please reference the issue number in the description.
|
If you are fixing a bug, please reference the issue number in the description.
|
||||||
|
|
||||||
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
|
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
|
||||||
|
|
||||||
@@ -1,20 +1,73 @@
|
|||||||
|
# This workflow checks the statuses of cached dependencies used in this action
|
||||||
|
# with the help of the Licensed tool. If any licenses are invalid or missing,
|
||||||
|
# this workflow will fail. See: https://github.com/licensee/licensed
|
||||||
|
|
||||||
name: Licensed
|
name: Licensed
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push: {branches: main}
|
pull_request:
|
||||||
pull_request: {branches: main}
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
licensed:
|
||||||
|
name: Check Licenses
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
- run: npm install
|
id: checkout
|
||||||
- name: Install licensed
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
id: setup-node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
id: npm-ci
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
id: setup-ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: ruby
|
||||||
|
|
||||||
|
- name: Setup Licensed
|
||||||
|
id: setup-licensed
|
||||||
|
uses: licensee/[email protected]
|
||||||
|
with:
|
||||||
|
version: 4.x
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# If this is a workflow_dispatch event, update the cached licenses.
|
||||||
|
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
name: Update Licenses
|
||||||
|
id: update-licenses
|
||||||
|
run: licensed cache
|
||||||
|
|
||||||
|
# Then, commit the updated licenses to the repository.
|
||||||
|
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
name: Commit Licenses
|
||||||
|
id: commit-licenses
|
||||||
run: |
|
run: |
|
||||||
cd $RUNNER_TEMP
|
git config --local user.email "[email protected]"
|
||||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
git config --local user.name "licensed-ci"
|
||||||
sudo tar -xzf licensed.tar.gz
|
git add .
|
||||||
sudo mv licensed /usr/local/bin/licensed
|
git commit -m "Auto-update license files"
|
||||||
- run: licensed status
|
git push
|
||||||
|
|
||||||
|
# Last, check the status of the cached licenses.
|
||||||
|
- name: Check Licenses
|
||||||
|
id: check-licenses
|
||||||
|
run: licensed status
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
name: Lint Codebase
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint Codebase
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
id: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
id: setup-node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
id: install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Lint Codebase
|
||||||
|
id: super-linter
|
||||||
|
uses: super-linter/super-linter/slim@v7
|
||||||
|
env:
|
||||||
|
DEFAULT_BRANCH: main
|
||||||
|
FILTER_REGEX_EXCLUDE: dist/**/*
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
LINTER_RULES_PATH: ${{ github.workspace }}
|
||||||
|
VALIDATE_ALL_CODEBASE: true
|
||||||
|
VALIDATE_JAVASCRIPT_ES: false
|
||||||
|
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||||
|
VALIDATE_JSCPD: false
|
||||||
|
VALIDATE_TYPESCRIPT_ES: false
|
||||||
|
VALIDATE_JSON: false
|
||||||
|
VALIDATE_TYPESCRIPT_STANDARD: false
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release Version
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
id: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: Tag
|
||||||
|
id: tag
|
||||||
|
uses: issue-ops/semver@v2
|
||||||
|
with:
|
||||||
|
manifest-path: package.json
|
||||||
|
workspace: ${{ github.workspace }}
|
||||||
|
ref: main
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: release
|
||||||
|
uses: issue-ops/releaser@v2
|
||||||
|
with:
|
||||||
|
tag: v${{ steps.tag.outputs.version }}
|
||||||
Reference in New Issue
Block a user