Skip to content

Commit

Permalink
refactor(ci): remove gulp / add wf dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Oct 4, 2024
1 parent c5b801a commit 0d4eb28
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1,919 deletions.
60 changes: 15 additions & 45 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,19 @@ on:
repository_dispatch:
types:
- release-triggered
workflow_dispatch:
inputs:
release_type:
description: 'Version type'
required: true
type: choice
options:
- major
- minor
- patch

jobs:
release-major:
if: ${{ github.event.client_payload.release_type == 'major' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-major
- id: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}
release-minor:
if: ${{ github.event.client_payload.release_type == 'minor' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-minor
- id: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}
release-patch:
if: ${{ github.event.client_payload.release_type == 'patch' }}
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -59,9 +28,10 @@ jobs:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-patch
- name: Build, Gen Changelog, Commit, Tag & Push
run: |
release_type=${{ github.event.inputs.release_type || github.event.client_payload.release_type }}
npm version $release_type -m "chore: release %s" --tag-version-prefix=""
- id: publish
run: npm publish --access public
env:
Expand Down
20 changes: 0 additions & 20 deletions bitbucket-pipelines.yml

This file was deleted.

3 changes: 1 addition & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default tseslint.config(
{
ignores: [
"**/test/*",
"commitlint.config.cjs",
"gulpfile.cjs"
"commitlint.config.cjs"
],
},{
extends: [
Expand Down
76 changes: 0 additions & 76 deletions gulpfile.cjs

This file was deleted.

15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"test:e2e": "jasmine --config=jasmine.json \"test/e2e/**/*.ts\"",
"build": "rm -rf dist && rollup -c",
"postinstall": "patch-package",
"release-major": "gulp --gulpfile gulpfile.cjs release --type major",
"release-minor": "gulp --gulpfile gulpfile.cjs release --type minor",
"release-patch": "gulp --gulpfile gulpfile.cjs release --type patch"
"changelog": "conventional-changelog -n commitlint.config.cjs -i CHANGELOG.md -s -p angular",
"version": "npm run build && npm run changelog && git add CHANGELOG.md",
"postversion": "git push && git push --tags"
},
"repository": {
"type": "git",
Expand All @@ -38,8 +38,6 @@
"@babel/preset-env": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@babel/register": "^7.25.7",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.11.1",
"@rollup/plugin-babel": "^6.0.4",
Expand All @@ -56,16 +54,11 @@
"@types/verror": "^1.10.10",
"ansi-colors": "^4.1.3",
"body-parser": "^2.0.1",
"conventional-changelog": "^6.0.0",
"conventional-changelog-cli": "^5.0.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.8.3",
"express": "^5.0.0",
"gulp": "^5.0.0",
"gulp-bump": "^3.2.0",
"gulp-cli": "^3.0.0",
"gulp-conventional-changelog": "^5.0.0",
"gulp-git": "^2.11.0",
"husky": "^9.1.6",
"jasmine": "^5.3.0",
"minimist": "^1.2.8",
Expand Down
Loading

0 comments on commit 0d4eb28

Please sign in to comment.