From 5fe64d4fb73f5068598ede43e4990a419423acec Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 19 Feb 2024 14:39:22 +0000 Subject: [PATCH 1/3] Migrate to woodpecker --- .drone.yml | 75 ------------------------------------------------- .woodpecker.yml | 23 +++++++++++++++ 2 files changed, 23 insertions(+), 75 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 48d8c9c..0000000 --- a/.drone.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- - -kind: pipeline -name: deployment - -steps: - - name: build - image: node - commands: - - yarn install --frozen-lockfile - - yarn build - - name: test - image: node - commands: - - yarn test - depends_on: - - build - - name: lint - image: node - commands: - - yarn lint - depends_on: - - build - - name: deploy - image: plugins/npm - settings: - username: vylpes - password: - from_secret: npm_password - email: ethan@vylpes.com - token: - from_secret: npm_token - depends_on: - - test - - lint - -trigger: - branch: - - master - event: - - push - - tag - ---- - -kind: pipeline -name: integration - -steps: - - name: build - image: node - commands: - - yarn install --frozen-lockfile - - yarn build - - name: test - image: node - commands: - - yarn test - depends_on: - - build - - name: lint - image: node - commands: - - yarn lint - depends_on: - - build - -trigger: - branch: - - develop - - feature/* - - hotfix/* - - renovate/* - event: - - push diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..7a25691 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,23 @@ +steps: + build: + image: node + commands: + - yarn install --frozen-lockfile + - yarn build + when: + event: push + branch: [ hotfix/*, feature/*, renovate/*, develop, main ] + lint: + image: node + commands: + - yarn lint + when: + event: push + branch: [ hotfix/*, feature/*, renovate/*, develop, main ] + test: + image: node + commands: + - yarn test + when: + event: push + branch: [ hotfix/*, feature/*, renovate/*, develop, main ] \ No newline at end of file -- 2.45.2 From 023062922a8a8675e969df7cb62970c9f0aaf6e0 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 19 Feb 2024 14:40:59 +0000 Subject: [PATCH 2/3] Make execute on PR --- .woodpecker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 7a25691..e76c233 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -5,19 +5,19 @@ steps: - yarn install --frozen-lockfile - yarn build when: - event: push + event: [ push, pull_request ] branch: [ hotfix/*, feature/*, renovate/*, develop, main ] lint: image: node commands: - yarn lint when: - event: push + event: [ push, pull_request ] branch: [ hotfix/*, feature/*, renovate/*, develop, main ] test: image: node commands: - yarn test when: - event: push + event: [ push, pull_request ] branch: [ hotfix/*, feature/*, renovate/*, develop, main ] \ No newline at end of file -- 2.45.2 From 315d9c5487c100a63f747f89e29ab4f3503c8659 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 19 Feb 2024 14:49:40 +0000 Subject: [PATCH 3/3] Add deploy script --- .woodpecker.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index e76c233..d05472f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -20,4 +20,18 @@ steps: - yarn test when: event: [ push, pull_request ] - branch: [ hotfix/*, feature/*, renovate/*, develop, main ] \ No newline at end of file + branch: [ hotfix/*, feature/*, renovate/*, develop, main ] + publish: + image: plugins/npm + settings: + username: + from_secret: NPM_USERNAME + email: + from_secret: NPM_EMAIL + password: + from_secret: NPM_PASSWORD + api_key: + from_secret: NPM_TOKEN + when: + event: tag + branch: main \ No newline at end of file -- 2.45.2