forked from cbowdon/TsMonad
-
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
Showing
4 changed files
with
130 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Main CI Workflow | ||
|
||
on: push | ||
|
||
jobs: | ||
build-test: | ||
name: Build, Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- run: yarn install | ||
- run: yarn 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REPO_NAME: magda-auth-oidc | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test | ||
|
||
- name: publish NPM package | ||
run: | | ||
npm config set @magda:registry https://registry.npmjs.org/ | ||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
npm publish --access public |
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,45 @@ | ||
name: set-version | ||
|
||
run-name: Set version ${{ inputs.version }} on ${{ github.ref_name }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Please input the new version number. e.g. `v2.0.0-alpha.0` with leading `v`" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
log-the-inputs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Version validation | ||
env: | ||
SELECTED_VERSION: ${{ inputs.version }} | ||
run: | | ||
SEMVER_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" | ||
[[ "${SELECTED_VERSION}" =~ $SEMVER_REGEX ]] || { echo "Invalid version number '$SELECTED_VERSION'. Should be e.g. 'v2.0.0-alpha.0' with leading 'v'." ; exit 1; } | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Utilities | ||
run: yarn install | ||
|
||
- name: Setup Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set version | ||
env: | ||
SELECTED_VERSION: ${{ inputs.version }} | ||
run: | | ||
VERSION_NUM=$(echo ${SELECTED_VERSION} | cut -b 2-) | ||
yarn version --new-version ${VERSION_NUM} | ||
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,37 +1,40 @@ | ||
{ | ||
"name": "@magda/tsmonad", | ||
"version": "0.9.0", | ||
"description": "TsMonad - fun-size monads library for TypeScript", | ||
"type": "module", | ||
"typings": "./dist/index.d.ts", | ||
"directories": {}, | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "yarn clean && tsc -b", | ||
"pretest": "yarn build", | ||
"test": "mocha dist/test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/magda-io/TsMonad.git" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"monad", | ||
"functional" | ||
], | ||
"author": { | ||
"name": "Chris Bowdon", | ||
"url": "https://github.com/cbowdon" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^18.11.9", | ||
"@types/underscore": "^1.8.0", | ||
"assert": "^2.1.0", | ||
"mocha": "^10.2.0", | ||
"typescript": "5.3.3", | ||
"underscore": "^1.13.6" | ||
} | ||
"name": "@magda/tsmonad", | ||
"version": "0.9.0", | ||
"description": "TsMonad - fun-size monads library for TypeScript", | ||
"type": "module", | ||
"exports": { | ||
"import": "./dist/index.js" | ||
}, | ||
"typings": "./dist/index.d.ts", | ||
"directories": {}, | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "yarn clean && tsc -b", | ||
"pretest": "yarn build", | ||
"test": "mocha dist/test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/magda-io/TsMonad.git" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"monad", | ||
"functional" | ||
], | ||
"author": { | ||
"name": "Chris Bowdon", | ||
"url": "https://github.com/cbowdon" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^18.11.9", | ||
"@types/underscore": "^1.8.0", | ||
"assert": "^2.1.0", | ||
"mocha": "^10.2.0", | ||
"typescript": "5.3.3", | ||
"underscore": "^1.13.6" | ||
} | ||
} |