-
Notifications
You must be signed in to change notification settings - Fork 42
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
2 changed files
with
22 additions
and
30 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 |
---|---|---|
|
@@ -2,34 +2,22 @@ name: Test & Maybe Release | |
on: [push, pull_request] | ||
jobs: | ||
test: | ||
name: Node ${{ matrix.node }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [14, 16, current, lts/*] | ||
# windows support not quite ready: os: [ubuntu-latest, windows-latest] | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
node: [16.x, 18.x, lts/*, current] | ||
# not quite windows ready, halp! os: [macos-latest, ubuntu-latest, windows-latest] | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Clone repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- run: git fetch --prune --unshallow | ||
|
||
- name: Set Node.js version | ||
uses: actions/setup-node@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js ${{ matrix.node }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- run: node --version | ||
- run: npm --version | ||
- run: git --version | ||
|
||
- name: Install npm dependencies | ||
run: npm install | ||
|
||
- name: Set up ghauth config (Ubuntu) | ||
run: | | ||
mkdir -p ~/.config/changelog-maker/ | ||
|
@@ -48,31 +36,33 @@ jobs: | |
echo {"user": "nodejs", "token": "${{ secrets.GITHUB_TOKEN }}"} > "%LOCALAPPDATA%\changelog-maker\config.json" | ||
shell: cmd | ||
if: startsWith(matrix.os, 'windows') | ||
|
||
- name: Install Dependencies | ||
run: | | ||
npm install --no-progress | ||
- name: Run tests | ||
run: npm test | ||
|
||
run: | | ||
npm config set script-shell bash | ||
npm run test:ci | ||
release: | ||
name: Release | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v3.6.0 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm install --no-progress --no-package-lock --no-save | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Install plugins | ||
run: | | ||
npm install \ | ||
|
@@ -84,9 +74,9 @@ jobs: | |
@semantic-release/git \ | ||
@semantic-release/changelog \ | ||
--no-progress --no-package-lock --no-save | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
|
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