-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
939 additions
and
1,514 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Checks | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
env: | ||
node_version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Build | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
package_type: module | ||
node_version: 16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: .npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm ci --cache .npm --prefer-offline | ||
|
||
- name: Extract tag version number | ||
id: get_version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- name: Substitute Manifest and Download Links For Versioned Ones | ||
id: sub_manifest_link_version | ||
uses: microsoft/variable-substitution@v1 | ||
with: | ||
files: 'src/${{ env.package_type }}.json' | ||
env: | ||
version: ${{ steps.get_version.outputs.version-without-v }} | ||
url: https://github.com/${{ github.repository }} | ||
manifest: https://github.com/${{ github.repository }}/releases/latest/download/${{ env.package_type }}.json | ||
download: https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/${{ env.package_type }}.zip | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
publish: | ||
needs: | ||
- lint | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download production artifacts for publication | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Create zip file | ||
working-directory: ./dist | ||
run: zip -r ../${{ env.package_type }}.zip . | ||
|
||
- name: Create release | ||
id: create_version_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true | ||
name: ${{ github.event.release.name }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: './dist/${{ env.package_type }}.json, ./${{ env.package_type }}.zip' | ||
body: ${{ github.event.release.body }} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.