-
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
1 parent
679c947
commit 73c74d2
Showing
6 changed files
with
211 additions
and
2 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,44 @@ | ||
## Description | ||
|
||
<!-- | ||
Please write a brief description of the changes introduced by this PR: What issues(s) does it address? How does it solve them? For ui-centric changes, please include a screenshot or video. | ||
--> | ||
|
||
|
||
## How to Test | ||
|
||
<!-- | ||
What steps can a reviewer take to manually test your changes? | ||
--> | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
**Outcome** | ||
|
||
<!-- | ||
What should a reviewer expect to happen in order to confirm your changes are working as expected? | ||
--> | ||
|
||
|
||
## Related / Discussions | ||
|
||
<!-- | ||
Link to related PRs or Issues | ||
e.g. https://github.com/busticated/jsville/pull/1 | ||
Link to any relevant community discussions | ||
e.g. As discussed here: https://github.com/<path-to-topic> | ||
--> | ||
|
||
|
||
## Completeness | ||
|
||
- [x] PR opened :tada: | ||
- [ ] Testing instructions have been provided | ||
- [ ] Docs have been updated (`npm run docs:build`) | ||
- [ ] Changes adhere to repo [conventions](https://github.com/busticated/jsville/DEVELOPMENT.md#conventions) | ||
- [ ] Development [How-To's](https://github.com/busticated/jsville/DEVELOPMENT.md#how-tos--faqs) have been provided | ||
- [ ] Branch is rebased against _target_ (typically `main`) | ||
|
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,56 @@ | ||
name: Run CI/CD Jobs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: 'busticated/jsville' | ||
|
||
jobs: | ||
info: | ||
name: Harvest Commit Info | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tags: ${{ steps.info.outputs.tags }} | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
- name: Set Info | ||
id: info | ||
run: ./bin/ci-set-commit-info.sh | ||
|
||
debug: | ||
name: Debug | ||
needs: info | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Log Info | ||
run: | | ||
echo ":::: GIT REF: ${{github.ref}}" | ||
echo ":::: GIT REF_NAME: ${{github.ref_name}}" | ||
echo ":::: TAGS: ${{needs.info.outputs.tags}}" | ||
- name: Test Tag Check | ||
if: contains(needs.info.outputs.tags, '@') | ||
run: | | ||
echo ":::: FOUND TAGS" | ||
test: | ||
name: Run Tests | ||
needs: [info, debug] | ||
uses: ./.github/workflows/test.yaml | ||
secrets: inherit | ||
|
||
publish: | ||
name: Publish | ||
needs: [info, debug, test] | ||
if: github.ref_name == 'main' && contains(needs.info.outputs.tags, '@bust/') | ||
uses: ./.github/workflows/publish.yaml | ||
secrets: inherit | ||
with: | ||
tags: ${{needs.info.outputs.tags}} | ||
|
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,32 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tags: | ||
type: string | ||
required: true | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
uses: bahmutov/npm-install@v1 | ||
- name: Upload to NPM | ||
run: | | ||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
echo ":::: Publishing as $(npm whoami)" | ||
npm run package:publish | ||
echo ":::: Done!" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,47 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
test: | ||
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
architecture: | ||
- x64 | ||
node_version: | ||
- 18 | ||
- 20 | ||
experimental: | ||
- false | ||
include: | ||
- node_version: 21 | ||
experimental: true | ||
os: ubuntu-latest | ||
architecture: x64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
architecture: ${{ matrix.architecture }} | ||
- name: Install Dependencies | ||
uses: bahmutov/npm-install@v1 | ||
- name: Run tests | ||
run: npm test | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
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,24 @@ | ||
#!/bin/bash | ||
|
||
echo | ||
echo ":::: GIT Commit:" | ||
git log -1 | ||
|
||
echo | ||
echo ":::: GIT Tags:" | ||
git tag --points-at HEAD | ||
|
||
taglistStr=$(git tag --points-at HEAD) | ||
declare -a taglist=($taglistStr) | ||
tags="" | ||
|
||
for tag in "${taglist[@]}"; do | ||
tags="${tags} ${tag}" | ||
done | ||
|
||
echo | ||
echo ":::: Set Action Output: Tags:" | ||
echo "tags=$tags" >> $GITHUB_OUTPUT | ||
echo $tags | ||
echo | ||
|
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