-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use Git Actions for build and release, deprecate Travis
- Loading branch information
JeB
committed
Dec 28, 2023
1 parent
fca425c
commit 9a36b36
Showing
7 changed files
with
122 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## PR Checklist | ||
|
||
Please check if your PR fulfills the following requirements: | ||
|
||
- [ ] Tests for the changes have been added (for bug fixes / features) | ||
- [ ] Docs have been added / updated (for bug fixes / features) | ||
|
||
## PR Type | ||
|
||
What kind of change does this PR introduce? | ||
|
||
<!-- Please check the one that applies to this PR using "x". --> | ||
|
||
``` | ||
[ ] Bugfix | ||
[ ] Feature | ||
[ ] Code style update (formatting, local variables) | ||
[ ] Refactoring (no functional changes, no api changes) | ||
[ ] Build related changes | ||
[ ] CI related changes | ||
[ ] Documentation content changes | ||
[ ] Other... Please describe: | ||
``` | ||
|
||
## What is the current behavior? | ||
|
||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
||
Issue Number: N/A | ||
|
||
## What is the new behavior? | ||
|
||
## Does this PR introduce a breaking change? | ||
|
||
``` | ||
[ ] Yes | ||
[ ] No | ||
``` | ||
|
||
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> | ||
|
||
## Other information |
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,6 +1,6 @@ | ||
from_owner: | ||
- just-jeb | ||
- dependabot-preview[bot] | ||
- renovate[bot] | ||
apply_labels: | ||
- autoapproved | ||
required_labels: [] |
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 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
if: (!contains(github.event.head_commit.message, 'chore(release)')) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ~/.npm # Default cache directory for npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run build and tests | ||
run: npm run 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,42 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_PERSONAL_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ~/.npm # Default cache directory for npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Release to NPM | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
git reset --hard | ||
git config --global user.name ${{ secrets.GIT_USER }} | ||
git config --global user.email ${{ secrets.GIT_EMAIL }} | ||
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
npm run release |
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