mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-22 01:44:43 +12:00
feat: expand workflows to all packages
This commit is contained in:
parent
6b6222bf51
commit
cd5c7fa20e
3 changed files with 10 additions and 6 deletions
2
.github/workflows/auto-deprecate.yml
vendored
2
.github/workflows/auto-deprecate.yml
vendored
|
@ -23,6 +23,6 @@ jobs:
|
|||
run: yarn --immutable
|
||||
|
||||
- name: Deprecate versions
|
||||
run: 'yarn npm-deprecate --name "*dev*" --package "discord.js"'
|
||||
run: 'yarn npm-deprecate --name "*dev*" --package "@discordjs/builders @discordjs/collection discord.js @discordjs/rest @discordjs/voice"'
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
|
2
.github/workflows/documentation.yml
vendored
2
.github/workflows/documentation.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
|||
- 'stable'
|
||||
- '!docs'
|
||||
tags:
|
||||
- '*'
|
||||
- '**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build documentation
|
||||
|
|
12
.github/workflows/publish-dev.yml
vendored
12
.github/workflows/publish-dev.yml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
jobs:
|
||||
npm:
|
||||
name: npm
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ['@discordjs/builders', '@discordjs/collection', 'discord.js', '@discordjs/rest', '@discordjs/voice']
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'discordjs'
|
||||
steps:
|
||||
|
@ -32,7 +36,7 @@ jobs:
|
|||
- name: Check previous released version
|
||||
id: pre-release
|
||||
run: |
|
||||
if [[ $(npm view discord.js@dev version | grep -e "$(jq --raw-output '.version' packages/discord.js/package.json).*.$(git rev-parse --short HEAD | cut -b1-3)") ]]; \
|
||||
if [[ $(npm view ${{ matrix.package }}@dev version | grep -e "$(jq --raw-output '.version' packages/${{ matrix.package }}/package.json).*.$(git rev-parse --short HEAD | cut -b1-3)") ]]; \
|
||||
then echo '::set-output name=release::false'; \
|
||||
else echo '::set-output name=release::true'; fi
|
||||
|
||||
|
@ -46,14 +50,14 @@ jobs:
|
|||
|
||||
- name: Deprecate old versions
|
||||
if: steps.pre-release.outputs.release == 'true'
|
||||
run: npm deprecate discord.js@"~$(jq --raw-output '.version' packages/discord.js/package.json)" "no longer supported" || true
|
||||
run: npm deprecate ${{ matrix.package }}@"~$(jq --raw-output '.version' packages/${{ matrix.package }}/package.json)" "no longer supported" || true
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Publish
|
||||
if: steps.pre-release.outputs.release == 'true'
|
||||
run: |
|
||||
yarn workspace discord.js version --no-git-tag-version --new-version $(jq --raw-output '.version' packages/discord.js/package.json).$(date +%s).$(git rev-parse --short HEAD)
|
||||
yarn workspace discord.js publish --tag dev || true
|
||||
yarn workspace ${{ matrix.package }} version --no-git-tag-version --new-version $(jq --raw-output '.version' packages/${{ matrix.package }}/package.json).$(date +%s).$(git rev-parse --short HEAD)
|
||||
yarn workspace ${{ matrix.package }} publish --tag dev || true
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
|
Loading…
Reference in a new issue