-
Notifications
You must be signed in to change notification settings - Fork 12
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
1 parent
bd4bd27
commit 58a8339
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
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,64 @@ | ||
name: SSMPublish Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
name: Tests and Coverage | ||
strategy: | ||
matrix: | ||
version: [14.19.3, 16, 18, 19] | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.version }} | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
- name: Install packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Tests and coverage | ||
run: | | ||
yarn test:coverage | ||
echo "Report Coverage..." | ||
yarn codecov | ||
publish: | ||
name: Pubish Package | ||
runs-on: ubuntu-20.04 | ||
needs: tests | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_TOKEN_ADMIN_USER }} | ||
|
||
- name: Install packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build and publish to NPM | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN_USER }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN_ADMIN_USER }} | ||
run: | | ||
echo "Building..." | ||
yarn build:ci | ||
echo "Deploying..." | ||
yarn semantic-release |