mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ci: fix building before linting/testing
This commit is contained in:
22
.github/workflows/publish-dev.yml
vendored
22
.github/workflows/publish-dev.yml
vendored
@@ -36,29 +36,7 @@ jobs:
|
|||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
cache-dependency-path: yarn.lock
|
cache-dependency-path: yarn.lock
|
||||||
|
|
||||||
- name: Check previous released version
|
|
||||||
id: pre-release
|
|
||||||
run: |
|
|
||||||
if [[ $(npm view ${{ matrix.package }}@dev version | grep -e "$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)\..*-$(git rev-parse --short HEAD)") ]]; \
|
|
||||||
then echo '::set-output name=release::false'; \
|
|
||||||
else echo '::set-output name=release::true'; fi
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.pre-release.outputs.release == 'true'
|
|
||||||
run: yarn --immutable
|
|
||||||
|
|
||||||
- name: Build dependencies
|
|
||||||
if: steps.pre-release.outputs.release == 'true'
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Deprecate old versions
|
|
||||||
if: steps.pre-release.outputs.release == 'true'
|
|
||||||
run: npm deprecate ${{ matrix.package }}@"~$(jq --raw-output '.version' packages/${{ matrix.folder }}/package.json)" "no longer supported" || true
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
if: steps.pre-release.outputs.release == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
yarn workspace ${{ matrix.package }} release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)"
|
yarn workspace ${{ matrix.package }} release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)"
|
||||||
yarn workspace ${{ matrix.package }} npm publish --tag dev || true
|
yarn workspace ${{ matrix.package }} npm publish --tag dev || true
|
||||||
|
|||||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -18,6 +18,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn --immutable
|
run: yarn --immutable
|
||||||
|
|
||||||
|
- name: Build dependencies
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
|
|
||||||
@@ -27,6 +30,3 @@ jobs:
|
|||||||
- name: Upload Coverage
|
- name: Upload Coverage
|
||||||
uses: ./packages/actions/src/uploadCoverage
|
uses: ./packages/actions/src/uploadCoverage
|
||||||
if: github.repository_owner == 'discordjs'
|
if: github.repository_owner == 'discordjs'
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: yarn build
|
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -4,13 +4,13 @@
|
|||||||
"description": "A powerful library for interacting with the Discord API",
|
"description": "A powerful library for interacting with the Discord API",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn workspaces foreach --topological run build",
|
"build": "yarn workspaces foreach --parallel --topological run build",
|
||||||
"test": "yarn workspaces foreach --topological run test",
|
"test": "yarn workspaces foreach --parallel --topological run test",
|
||||||
"lint": "yarn workspaces foreach --topological run lint",
|
"lint": "yarn workspaces foreach --parallel --topological run lint",
|
||||||
"format": "yarn workspaces foreach --topological run format",
|
"format": "yarn workspaces foreach --parallel --topological run format",
|
||||||
"fmt": "yarn format",
|
"fmt": "yarn format",
|
||||||
"postinstall": "is-ci || husky install",
|
"postinstall": "is-ci || husky install",
|
||||||
"docs": "yarn workspaces foreach --topological run docs",
|
"docs": "yarn workspaces foreach --parallel --topological run docs",
|
||||||
"update": "yarn upgrade-interactive"
|
"update": "yarn upgrade-interactive"
|
||||||
},
|
},
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|||||||
Reference in New Issue
Block a user