-
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
Showing
4 changed files
with
88 additions
and
4 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,10 @@ | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
name: 'Pull Request' | ||
|
||
jobs: | ||
tests: | ||
name: 'Lint and Tests' | ||
uses: ./.github/workflows/tests.yml |
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,36 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- beta | ||
- +([0-9])?(.{+([0-9]),x}).x | ||
|
||
name: 'Release' | ||
|
||
jobs: | ||
tests: | ||
name: 'Lint and Tests' | ||
uses: ./.github/workflows/tests.yml | ||
|
||
release: | ||
name: 'Publish Release' | ||
needs: [tests] | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: npm | ||
node-version: 16 | ||
- run: npm ci --no-audit | ||
- run: npm run build | ||
- uses: codfish/semantic-release-action@v2 | ||
id: semantic | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: 'Output new release version' | ||
if: steps.semantic.outputs.new-release-published == 'true' | ||
run: | | ||
echo "## New Release Published" >> $GITHUB_STEP_SUMMARY | ||
echo "🎉 ${{ steps.semantic.outputs.release-version }}" >> $GITHUB_STEP_SUMMARY |
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,37 @@ | ||
on: | ||
workflow_call: | ||
|
||
name: 'Tests' | ||
|
||
jobs: | ||
tests: | ||
name: 'Pull Request Checks' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Check out the repo' | ||
uses: actions/checkout@v3 | ||
|
||
- name: 'Install Node.js' | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: npm | ||
node-version: 16 | ||
|
||
- name: 'Install the dependencies' | ||
run: npm ci --no-audit | ||
|
||
- name: 'Lint the code' | ||
run: npm run lint | ||
|
||
- name: 'Add lint summary' | ||
run: | | ||
echo "## Lint results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | ||
- name: 'Test run build' | ||
run: npm run build | ||
|
||
- name: 'Add test summary' | ||
run: | | ||
echo "## Build results" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |
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