-
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
cb2a17b
commit c28b66a
Showing
3 changed files
with
114 additions
and
115 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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: Build and test | ||
|
||
on: | ||
push: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build application | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build application | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test |
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,41 +1,40 @@ | ||
name: Publish beta | ||
on: | ||
workflow_dispatch | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
publish-beta: | ||
name: Publish to package registry | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.15.0' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Bump version | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
npm version prerelease --preid beta | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build package | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
- name: Publish package | ||
id: publish | ||
run: npm publish --tag beta | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push new version tag | ||
if: steps.publish.outcome == 'success' | ||
run: git push | ||
publish-beta: | ||
name: Publish to package registry | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Bump version | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
npm version prerelease --preid beta | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build package | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
- name: Publish package | ||
id: publish | ||
run: npm publish --tag beta | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push new version tag | ||
if: steps.publish.outcome == 'success' | ||
run: git push |
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,61 +1,61 @@ | ||
name: Publish release (master only) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
type: choice | ||
required: true | ||
description: 'Release type' | ||
default: 'patch' | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
releaseBody: | ||
type: string | ||
required: true | ||
description: 'Release description' | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
type: choice | ||
required: true | ||
description: 'Release type' | ||
default: 'patch' | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
releaseBody: | ||
type: string | ||
required: true | ||
description: 'Release description' | ||
|
||
jobs: | ||
publish: | ||
name: Publish to package registry | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v2 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.15.0' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Bump version | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
echo "VERSION_TAG=$(npm version ${{ github.event.inputs.releaseType }})" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build package | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
- name: Publish package | ||
id: publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push new version tag | ||
if: steps.publish.outcome == 'success' | ||
run: git push | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.VERSION_TAG }} | ||
body: ${{ github.event.inputs.releaseBody }} | ||
publish: | ||
name: Publish to package registry | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v2 | ||
- name: Setup node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
registry-url: 'https://npm.pkg.github.com' | ||
cache: 'npm' | ||
- name: Bump version | ||
run: | | ||
git config --global user.name '${{ github.actor }}' | ||
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | ||
echo "VERSION_TAG=$(npm version ${{ github.event.inputs.releaseType }})" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | ||
- name: Build package | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
- name: Publish package | ||
id: publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push new version tag | ||
if: steps.publish.outcome == 'success' | ||
run: git push | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.VERSION_TAG }} | ||
body: ${{ github.event.inputs.releaseBody }} |