-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hello-world
- Loading branch information
Showing
2 changed files
with
67 additions
and
22 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 |
---|---|---|
|
@@ -5,14 +5,12 @@ name: Node.js Package | |
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths-ignore: | ||
- "README.md" | ||
- "CHANGELOG.md" | ||
|
||
jobs: | ||
test: | ||
name: Test Code | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -25,6 +23,7 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
# TODO: cache node packages | ||
- name: Install Node Packages | ||
run: npm install | ||
|
||
|
@@ -35,16 +34,11 @@ jobs: | |
# - name: Test Code | ||
# run: npm run test -- --watchAll=false | ||
|
||
release: | ||
name: Publish Release | ||
build: | ||
needs: [test] | ||
concurrency: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -55,12 +49,13 @@ jobs: | |
git config --local user.name github-actions | ||
git config --local user.email [email protected] | ||
# TODO: cache node packages | ||
- name: Install Node Packages | ||
run: npm install --only=dev | ||
|
||
- name: Build Package | ||
run: npm run build | ||
|
||
- name: Push Build Files | ||
run: | | ||
git add lib/* | ||
|
@@ -69,6 +64,25 @@ jobs: | |
git push | ||
fi | ||
release: | ||
needs: [test, build] | ||
concurrency: release | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19.7 | ||
|
||
# TODO: group release dependencies | ||
- name: Install Node Packages | ||
run: npm install --only=dev | ||
|
||
- name: Publish Semantic Release | ||
env: | ||
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_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