forked from oclif/plugin-update
-
Notifications
You must be signed in to change notification settings - Fork 3
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
lshadler
committed
Sep 27, 2021
1 parent
b9e9afc
commit 7a92029
Showing
3 changed files
with
87 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,26 +1,46 @@ | ||
name: Node.js CI | ||
name: PR Merge Verification | ||
|
||
# Controls when the action will run. | ||
on: | ||
push: | ||
branches: [ master ] | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
runs-on: windows-latest | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
node-version: [10.x, 12.x, 14.x, 16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn install | ||
env: | ||
CI: true | ||
- run: yarn test | ||
env: | ||
CI: true | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: '**/node_modules' | ||
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node-${{ matrix.node-version }} | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Lint files | ||
run: yarn lint | ||
- name: Test | ||
run: yarn test | ||
- name: Generate assets | ||
run: yarn 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,51 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Release with Testing | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
release: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [15.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: '**/node_modules' | ||
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node-${{ matrix.node-version }} | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Generate assets | ||
run: yarn build | ||
- name: Release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
git fetch --tags | ||
yarn semantic-release -e @oclif/semantic-release |