File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ SEMVER_TYPE :
7+ description : ' Semver type'
8+ required : true
9+ default : ' patch'
10+ type : choice
11+ options :
12+ - patch
13+ - minor
14+ - major
15+
16+ jobs :
17+ publish-npm :
18+ environment : publish
19+ runs-on : ubuntu-latest
20+ permissions :
21+ contents : read
22+ id-token : write
23+ steps :
24+ - uses : actions/checkout@v4
25+ - name : Check if on main branch
26+ run : |
27+ if [[ $GITHUB_REF != 'refs/heads/main' ]]; then
28+ echo "This workflow must run on the 'main' branch."
29+ exit 1
30+ fi
31+ - uses : actions/setup-node@v4
32+ with :
33+ node-version : ' lts/*'
34+ cache : ' npm'
35+ registry-url : ' https://registry.npmjs.org'
36+ scope : ' @workfront'
37+ - run : npm ci
38+ - name : Bump package version
39+ run : |
40+ git config --global user.name 'github-actions[bot]'
41+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
42+ echo "Bumping version as ${{ github.event.inputs.SEMVER_TYPE }}"
43+ npm version ${{ github.event.inputs.SEMVER_TYPE }}
44+ VERSION=$(node -p "require('./package.json').version")
45+ git push origin main --follow-tags
46+ - run : npm publish --provenance --access public
47+ env :
48+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Verify
2+
3+ on :
4+ push :
5+ branches : [ $default-branch ]
6+ pull_request :
7+ branches : [ $default-branch ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : lts/*
18+ cache : ' npm'
19+ registry-url : ' https://registry.npmjs.org'
20+ scope : ' @workfront'
21+ - run : npm ci
22+ - run : npm run build
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- # workfront- api-constants
1+ # @ workfront/ api-constants
22
3- [ ![ NPM version] [ npm-version-image ]] [ npm-url ] [ ![ NPM downloads] [ npm-downloads-image ]] [ npm-url ] [ ![ Apache v2 License] [ license-image ]] [ license-url ] [ ![ Build Status ] [ travis-image ]] [ travis-url ]
3+ [ ![ NPM version] [ npm-version-image ]] [ npm-url ] [ ![ NPM downloads] [ npm-downloads-image ]] [ npm-url ] [ ![ Apache v2 License] [ license-image ]] [ license-url ]
44
55Definitions for all constants which can be used to interact with Workfront API
66
@@ -45,9 +45,6 @@ See the top-level file `LICENSE` and
4545[ license-image ] : http://img.shields.io/badge/license-APv2-blue.svg?style=flat
4646[ license-url ] : LICENSE
4747
48- [ npm-url ] : https://www.npmjs.org/package/workfront-api-constants
49- [ npm-version-image ] : https://img.shields.io/npm/v/workfront-api-constants.svg?style=flat
50- [ npm-downloads-image ] : https://img.shields.io/npm/dm/workfront-api-constants.svg?style=flat
51-
52- [ travis-url ] : https://travis-ci.org/Workfront/workfront-api-constants
53- [ travis-image ] : https://img.shields.io/travis/Workfront/workfront-api-constants.svg?style=flat
48+ [ npm-url ] : https://www.npmjs.org/package/@workfront/api-constants
49+ [ npm-version-image ] : https://img.shields.io/npm/v/@workfront/api-constants.svg?style=flat
50+ [ npm-downloads-image ] : https://img.shields.io/npm/dm/@workfront/api-constants.svg?style=flat
Original file line number Diff line number Diff line change 1111 ],
1212 "dependencies" : {},
1313 "devDependencies" : {
14- "npm-run-all" : " 4.1.5" ,
15- "typescript" : " 3.8.3"
14+ "typescript" : " 5.8.2"
1615 },
1716 "scripts" : {
18- "prepublish " : " npm run build" ,
17+ "prepublishOnly " : " npm run build" ,
1918 "build:umd" : " tsc --removeComments --module umd --outDir dist/umd/ src/*.ts" ,
2019 "build:es" : " tsc --module es6 --target es5 --declaration --outDir dist/ src/*.ts" ,
21- "build" : " run-p build:** " ,
20+ "build" : " npm run build:umd && npm run build:es " ,
2221 "test" : " exit 0"
2322 },
2423 "repository" : {
Original file line number Diff line number Diff line change 22 "exclude" : [
33 " node_modules"
44 ],
5+ "strict" : true ,
56 "compileOnSave" : false ,
67 "buildOnSave" : false ,
78 "atom" : {
You can’t perform that action at this time.
0 commit comments