mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
ci: extract package and semver from tag
This commit is contained in:
23
.github/workflows/documentation.yml
vendored
23
.github/workflows/documentation.yml
vendored
@@ -82,13 +82,32 @@ jobs:
|
|||||||
token: ${{ secrets.DJS_DOCS }}
|
token: ${{ secrets.DJS_DOCS }}
|
||||||
path: 'out'
|
path: 'out'
|
||||||
|
|
||||||
|
- name: 'Extract package from tag'
|
||||||
|
if: env.BRANCH_OR_TAG == 'tag'
|
||||||
|
id: package-name
|
||||||
|
uses: frabert/replace-string-action@v2.0
|
||||||
|
with:
|
||||||
|
pattern: '(^@.*\\/(?<package>.*)@v?)?(?<semver>\d+.\d+.\d+)-?.*'
|
||||||
|
string: ${{ env.BRANCH_NAME }}
|
||||||
|
replace-with: '$<package>'
|
||||||
|
|
||||||
|
- name: 'Extract semver from tag'
|
||||||
|
if: env.BRANCH_OR_TAG == 'tag'
|
||||||
|
id: semver
|
||||||
|
uses: frabert/replace-string-action@v2.0
|
||||||
|
with:
|
||||||
|
pattern: '(^@.*\\/(?<package>.*)@v?)?(?<semver>\d+.\d+.\d+)-?.*'
|
||||||
|
string: ${{ env.BRANCH_NAME }}
|
||||||
|
replace-with: '$<semver>'
|
||||||
|
|
||||||
- name: Move docs to correct directory
|
- name: Move docs to correct directory
|
||||||
if: env.BRANCH_OR_TAG == 'tag'
|
if: env.BRANCH_OR_TAG == 'tag'
|
||||||
env:
|
env:
|
||||||
PACKAGE: ${{ matrix.package }}
|
PACKAGE: ${{ steps.package-name.outputs.replaced }}
|
||||||
|
SEMVER: ${{ steps.semver.outputs.replaced }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p out/${PACKAGE}
|
mkdir -p out/${PACKAGE}
|
||||||
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/$(jq --raw-output '.version' packages/${PACKAGE}/package.json).json
|
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${SEMVER}.json
|
||||||
|
|
||||||
- name: Move docs to correct directory
|
- name: Move docs to correct directory
|
||||||
if: env.BRANCH_OR_TAG == 'branch'
|
if: env.BRANCH_OR_TAG == 'branch'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@discordjs/builders",
|
"name": "@discordjs/builders",
|
||||||
"version": "0.13.0",
|
"version": "0.14.0-dev",
|
||||||
"description": "A set of builders that you can use when creating your bot",
|
"description": "A set of builders that you can use when creating your bot",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@discordjs/collection",
|
"name": "@discordjs/collection",
|
||||||
"version": "0.6.0",
|
"version": "0.7.0-dev",
|
||||||
"description": "Utility data structure used in discord.js",
|
"description": "Utility data structure used in discord.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --pass-with-no-tests",
|
"test": "jest --pass-with-no-tests",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@discordjs/rest",
|
"name": "@discordjs/rest",
|
||||||
"version": "0.4.0",
|
"version": "0.5.0-dev",
|
||||||
"description": "The REST API for discord.js",
|
"description": "The REST API for discord.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup && tsc --emitDeclarationOnly --incremental",
|
"build": "tsup && tsc --emitDeclarationOnly --incremental",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@discordjs/voice",
|
"name": "@discordjs/voice",
|
||||||
"version": "0.9.0",
|
"version": "0.10.0-dev",
|
||||||
"description": "Implementation of the Discord Voice API for node.js",
|
"description": "Implementation of the Discord Voice API for node.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup && node scripts/postbuild.mjs",
|
"build": "tsup && node scripts/postbuild.mjs",
|
||||||
|
|||||||
Reference in New Issue
Block a user