generated from christian-bromann/typescript-starter
-
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
392ac4b
commit 18c375e
Showing
1 changed file
with
65 additions
and
65 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,73 +1,73 @@ | ||
name: Manual NPM Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
description: "Release type - major, minor or patch" | ||
required: true | ||
type: choice | ||
default: "patch" | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
additionalFlags: | ||
description: "Additional flags for pre-releases, e.g. '--dry-run', '--preRelease=beta' or '--preRelease'" | ||
required: false | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
description: "Release type - major, minor or patch" | ||
required: true | ||
type: choice | ||
default: "patch" | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
additionalFlags: | ||
description: "Additional flags for pre-releases, e.g. '--dry-run', '--preRelease=beta' or '--preRelease'" | ||
required: false | ||
type: string | ||
|
||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build Package | ||
run: npm run build | ||
env: | ||
NODE_ENV: production | ||
- name: Run tests | ||
run: npm test | ||
- name: Upload built package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: compiled-package | ||
path: build/ | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build Package | ||
run: npm run build | ||
env: | ||
NODE_ENV: production | ||
- name: Run tests | ||
run: npm test | ||
- name: Upload built package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: compiled-package | ||
path: build/ | ||
|
||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "stateful-wombot" | ||
git config --global user.email "[email protected]" | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Download built package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: compiled-package | ||
path: build/ | ||
- name: Release | ||
run: npm run release:ci -- ${{github.event.inputs.releaseType}} ${{github.event.inputs.additionalFlags}} | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Setup Git | ||
run: | | ||
git config --global user.name "stateful-wombot" | ||
git config --global user.email "[email protected]" | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Download built package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: compiled-package | ||
path: build/ | ||
- name: Release | ||
run: npm run release:ci -- ${{github.event.inputs.releaseType}} ${{github.event.inputs.additionalFlags}} | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |