Compare commits

..

3 commits

Author SHA1 Message Date
18f8d7d2c8
ci: only fetch target branch for commitlint
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful
ci/woodpecker/manual/checks Pipeline was successful
ci/woodpecker/manual/release Pipeline was successful
2023-07-22 00:34:20 +02:00
29164fc148
ci: make mark releases for the beta channel as prereleases
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
2023-07-22 00:30:17 +02:00
4f9ba624de
chore: properly format yaml files 2023-07-22 00:16:14 +02:00
7 changed files with 305 additions and 288 deletions

View file

@ -6,94 +6,94 @@ name: Bug Report
about: File a bug report about: File a bug report
labels: ["bug", "to be confirmed"] labels: ["bug", "to be confirmed"]
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Your issue may already have been reported! Please search on the [issue tracker](https://git.f3l.de/dungeonslayers/ds4/issues) before submitting a new one. Your issue may already have been reported! Please search on the [issue tracker](https://git.f3l.de/dungeonslayers/ds4/issues) before submitting a new one.
Thanks for taking the time to fill out this bug report! In order to make it effective, please provide the following information. Thanks for taking the time to fill out this bug report! In order to make it effective, please provide the following information.
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
## Issue Description ## Issue Description
- type: textarea - type: textarea
id: expected id: expected
attributes: attributes:
label: Expected Behavior label: Expected Behavior
description: What is the behavior that you expected? description: What is the behavior that you expected?
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: current id: current
attributes: attributes:
label: Current Behavior label: Current Behavior
description: What is the current behavior, i.e., what happens actually? description: What is the current behavior, i.e., what happens actually?
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: steps id: steps
attributes: attributes:
label: Steps to Reproduce label: Steps to Reproduce
description: What are the steps to reproduce the problem? description: What are the steps to reproduce the problem?
placeholder: | placeholder: |
1. 1.
2. 2.
3. 3.
4. 4.
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: context id: context
attributes: attributes:
label: Context label: Context
description: Please provide any additional context that might be helpful, e.g. log messages, screenshots, videos, or exports of problematic scenes or worlds. description: Please provide any additional context that might be helpful, e.g. log messages, screenshots, videos, or exports of problematic scenes or worlds.
validations: validations:
required: false required: false
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
## Environment Details ## Environment Details
- type: input - type: input
id: version id: version
attributes: attributes:
label: Version label: Version
description: Which version(s) of DS4 are you seeing the problem on? description: Which version(s) of DS4 are you seeing the problem on?
validations: validations:
required: true required: true
- type: input - type: input
id: foundry-version id: foundry-version
attributes: attributes:
label: Foundry VTT Version label: Foundry VTT Version
description: Which version(s) and build of Foundry VTT are you seeing the problem on? description: Which version(s) and build of Foundry VTT are you seeing the problem on?
validations: validations:
required: true required: true
- type: input - type: input
id: os id: os
attributes: attributes:
label: Operating System label: Operating System
description: Which operating system are you using? (Windows, OS X, Linux (which distro)) description: Which operating system are you using? (Windows, OS X, Linux (which distro))
placeholder: Windows placeholder: Windows
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
id: browser id: browser
attributes: attributes:
label: Browser / App label: Browser / App
description: Are you using a Browser or the native Electron application? (Select all that apply) description: Are you using a Browser or the native Electron application? (Select all that apply)
multiple: true multiple: true
options: options:
- Native Electron App - Native Electron App
- Chrome - Chrome
- Firefox - Firefox
- Microsoft Edge - Microsoft Edge
- Safari - Safari
- Other - Other
validations: validations:
required: true required: true
- type: input - type: input
id: modules id: modules
attributes: attributes:
label: Relevant Modules label: Relevant Modules
description: Please list any other active modules (including their versions) that you think might be relevant. description: Please list any other active modules (including their versions) that you think might be relevant.
validations: validations:
required: false required: false

View file

@ -6,23 +6,23 @@ name: Feature Request
description: Submit a feature request description: Submit a feature request
labels: ["feature"] labels: ["feature"]
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Your issue may already have been reported! Please search on the [issue tracker](https://git.f3l.de/dungeonslayers/ds4/issues) before submitting a new one. Your issue may already have been reported! Please search on the [issue tracker](https://git.f3l.de/dungeonslayers/ds4/issues) before submitting a new one.
In order to submit an effective feature request, please provide the following information. In order to submit an effective feature request, please provide the following information.
- type: textarea - type: textarea
id: description id: description
attributes: attributes:
label: Description label: Description
description: Please describe the proposal in as much detail as you feel is necessary. description: Please describe the proposal in as much detail as you feel is necessary.
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: context id: context
attributes: attributes:
label: Context label: Context
description: Is there anything else you can add about the proposal? You might want to link to related issues here if you haven't already. description: Is there anything else you can add about the proposal? You might want to link to related issues here if you haven't already.
validations: validations:
required: false required: false

View file

@ -8,3 +8,4 @@
/.vscode/ /.vscode/
client client
common common
pnpm-lock.yaml

View file

@ -5,66 +5,66 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json $schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
variables: variables:
- &node_image node:lts - &node_image node:lts
- &enable_pnpm - &enable_pnpm
- corepack enable - corepack enable
- corepack prepare pnpm@latest --activate - corepack prepare pnpm@latest --activate
when: when:
- event: push - event: push
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
- event: pull_request - event: pull_request
- event: tag - event: tag
- event: manual - event: manual
steps: steps:
install: install:
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
lint: lint:
group: check group: check
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm lint - pnpm lint
formatcheck: formatcheck:
group: check group: check
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm format:check - pnpm format:check
typecheck: typecheck:
group: check group: check
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm typecheck - pnpm typecheck
test: test:
group: check group: check
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm test - pnpm test
reuse: reuse:
group: check group: check
image: fsfe/reuse:latest image: fsfe/reuse:latest
commands: commands:
- reuse lint - reuse lint
commitlint: commitlint:
group: check group: check
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- git fetch - git fetch origin ${CI_COMMIT_TARGET_BRANCH}
- pnpm exec commitlint --from origin/${CI_COMMIT_TARGET_BRANCH} - pnpm exec commitlint --from origin/${CI_COMMIT_TARGET_BRANCH}
when: when:
event: pull_request event: pull_request
build: build:
group: build group: build
image: *node_image image: *node_image
commands: commands:
- export APPDATA=$(pwd) - export APPDATA=$(pwd)
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm build - pnpm build

View file

@ -5,94 +5,110 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json $schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
variables: variables:
- &node_image node:lts - &node_image node:lts
- &enable_pnpm - &enable_pnpm
- corepack enable - corepack enable
- corepack prepare pnpm@latest --activate - corepack prepare pnpm@latest --activate
- &is_latest_channel
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$"
- &is_beta_channel
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+-[0-9]+$"
- &release_plugin woodpeckerci/plugin-gitea-release
- &release_base_settings
base_url: ${CI_FORGE_URL}
title: ${CI_COMMIT_TAG}
note: CHANGELOG.md
files:
- ${CI_REPO_NAME}.zip
- ${CI_REPO_NAME}/system.json
api_key:
from_secret: forge_token
when: when:
event: tag event: tag
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9]+)?$" evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9]+)?$"
depends_on: depends_on:
- checks - checks
steps: steps:
install: install:
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
build: build:
image: *node_image image: *node_image
environment: environment:
NODE_ENV: production NODE_ENV: production
commands: commands:
- export APPDATA=$(pwd) - export APPDATA=$(pwd)
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm build - pnpm build
package: package:
group: prepare-release group: prepare-release
image: alpine:latest image: alpine:latest
commands: commands:
- apk update - apk update
- apk add zip curl - apk add zip curl
- mv dist ${CI_REPO_NAME} - mv dist ${CI_REPO_NAME}
- zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/* - zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/*
changelog: changelog:
group: prepare-release group: prepare-release
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm changelog - pnpm changelog
choose-latest-channel: choose-latest-channel:
group: prepare-release group: prepare-release
image: alpine:latest image: alpine:latest
commands: commands:
- echo latest > .RELEASE_CHANNEL - echo latest > .RELEASE_CHANNEL
when: when:
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$" <<: *is_latest_channel
choose-beta-channel: choose-beta-channel:
group: prepare-release group: prepare-release
image: alpine:latest image: alpine:latest
commands: commands:
- echo beta > .RELEASE_CHANNEL - echo beta > .RELEASE_CHANNEL
when: when:
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+-[0-9]+$" <<: *is_beta_channel
release: release-latest:
image: woodpeckerci/plugin-gitea-release image: *release_plugin
settings: settings:
base_url: ${CI_FORGE_URL} <<: *release_base_settings
title: ${CI_COMMIT_TAG} when:
note: CHANGELOG.md <<: *is_latest_channel
files: release-beta:
- ${CI_REPO_NAME}.zip image: *release_plugin
- ${CI_REPO_NAME}/system.json settings:
api_key: <<: *release_base_settings
from_secret: forge_token prerelease: true
publish-manifest: when:
group: publish <<: *is_beta_channel
image: alpine:latest publish-manifest:
commands: group: publish
- apk update image: alpine:latest
- apk add curl commands:
- export RELEASE_CHANNEL=$(cat .RELEASE_CHANNEL) - apk update
- 'curl --header "Authorization: token $${FORGE_TOKEN}" -X "DELETE" "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' - apk add curl
- 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/system.json "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' - export RELEASE_CHANNEL=$(cat .RELEASE_CHANNEL)
secrets: - 'curl --header "Authorization: token $${FORGE_TOKEN}" -X "DELETE" "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"'
- forge_token - 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/system.json "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"'
publish-to-foundry-admin: secrets:
group: publish - forge_token
image: johannesloher/foundry-publish publish-to-foundry-admin:
environment: group: publish
FVTT_DELETE_OBSOLETE_VERSIONS: "true" image: johannesloher/foundry-publish
commands: environment:
- export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/system.json FVTT_DELETE_OBSOLETE_VERSIONS: "true"
- export FVTT_MANIFEST_URL=${CI_REPO_URL}/releases/download/${CI_COMMIT_TAG}/system.json commands:
- foundry-publish - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/system.json
secrets: - export FVTT_MANIFEST_URL=${CI_REPO_URL}/releases/download/${CI_COMMIT_TAG}/system.json
- fvtt_package_id - foundry-publish
- fvtt_username secrets:
- fvtt_password - fvtt_package_id
when: - fvtt_username
evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$" - fvtt_password
when:
<<: *is_latest_channel

View file

@ -5,43 +5,43 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json $schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
variables: variables:
- &node_image node:lts - &node_image node:lts
- &enable_pnpm - &enable_pnpm
- corepack enable - corepack enable
- corepack prepare pnpm@latest --activate - corepack prepare pnpm@latest --activate
when: when:
event: manual event: manual
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
depends_on: depends_on:
- checks - checks
steps: steps:
install: install:
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
release: release:
image: *node_image image: *node_image
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- apt-get update - apt-get update
- apt-get install --yes jq - apt-get install --yes jq
- export REPOSITORY_URL=$(echo "${CI_REPO_CLONE_URL}" | sed -e "s|://|://$${FORGE_TOKEN_NAME}:$${FORGE_TOKEN}@|g") - export REPOSITORY_URL=$(echo "${CI_REPO_CLONE_URL}" | sed -e "s|://|://$${FORGE_TOKEN_NAME}:$${FORGE_TOKEN}@|g")
- git remote set-url origin $${REPOSITORY_URL} - git remote set-url origin $${REPOSITORY_URL}
- git config user.name woodpecker[bot] - git config user.name woodpecker[bot]
- git config user.email woodpecker[bot]@${CI_SYSTEM_HOST} - git config user.email woodpecker[bot]@${CI_SYSTEM_HOST}
- pnpm bump-version --release=${RELEASE_TYPE} - pnpm bump-version --release=${RELEASE_TYPE}
- pnpm exec prettier package.json system.json - pnpm exec prettier package.json system.json
- export RELEASE_VERSION=$(jq -r '.version' < package.json) - export RELEASE_VERSION=$(jq -r '.version' < package.json)
- git --no-pager diff - git --no-pager diff
- git add package.json system.json - git add package.json system.json
- 'git commit -m "chore(release): $${RELEASE_VERSION}"' - 'git commit -m "chore(release): $${RELEASE_VERSION}"'
- git tag -f $${RELEASE_VERSION} - git tag -f $${RELEASE_VERSION}
- git push origin ${CI_COMMIT_BRANCH} - git push origin ${CI_COMMIT_BRANCH}
- git push origin $${RELEASE_VERSION} - git push origin $${RELEASE_VERSION}
secrets: secrets:
- forge_token_name - forge_token_name
- forge_token - forge_token

View file

@ -52,7 +52,7 @@
"eslint": "eslint --ext .ts,.js,.cjs,.mjs .", "eslint": "eslint --ext .ts,.js,.cjs,.mjs .",
"format": "pnpm prettier --write", "format": "pnpm prettier --write",
"format:check": "pnpm prettier --check", "format:check": "pnpm prettier --check",
"prettier": "prettier \"./**/*.(ts|js|cjs|mjs|json|scss|yml)\"", "prettier": "prettier \"./**/*.(ts|js|cjs|mjs|json|scss|yml|yaml)\"",
"test": "run-p test:vitest test:typecheck", "test": "run-p test:vitest test:typecheck",
"test:vitest": "vitest run", "test:vitest": "vitest run",
"test:typecheck": "tsc --noEmit --project spec/tsconfig.json", "test:typecheck": "tsc --noEmit --project spec/tsconfig.json",