Compare commits
2 commits
55d812ea89
...
ad91668a44
Author | SHA1 | Date | |
---|---|---|---|
|
ad91668a44 | ||
|
974b13d6da |
4 changed files with 47 additions and 24 deletions
|
@ -1,22 +0,0 @@
|
||||||
image: node:latest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- publish
|
|
||||||
|
|
||||||
publish:
|
|
||||||
stage: publish
|
|
||||||
script:
|
|
||||||
# Remove the references so it builds cleanly.
|
|
||||||
- apt-get update
|
|
||||||
- apt-get install jq -y
|
|
||||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
|
||||||
|
|
||||||
# Make sure the commits are clean
|
|
||||||
- yarn install --frozen-lockfile
|
|
||||||
- if [ $CI_BUILD_BEFORE_SHA == "0000000000000000000000000000000000000000" ]; then npx commitlint --to=HEAD; else npx commitlint --from=$CI_BUILD_BEFORE_SHA; fi
|
|
||||||
|
|
||||||
# Build the project
|
|
||||||
- yarn run build
|
|
||||||
|
|
||||||
# Perform the automatic release process
|
|
||||||
- npx semantic-release --repository-url=https://oauth2:$GITLAB_TOKEN@gitlab.com/mfgames-writing/markdowny.git
|
|
45
.woodpecker.yml
Normal file
45
.woodpecker.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
settings:
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||||
|
commands:
|
||||||
|
- nix develop --command scripts/build.sh
|
||||||
|
when:
|
||||||
|
event: [push, manual]
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||||
|
commands:
|
||||||
|
- nix develop --command scripts/test.sh
|
||||||
|
when:
|
||||||
|
event: [push, manual]
|
||||||
|
|
||||||
|
release-main:
|
||||||
|
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||||
|
commands:
|
||||||
|
- nix develop --command scripts/release.sh
|
||||||
|
secrets:
|
||||||
|
- gitea_token
|
||||||
|
- git_credentials
|
||||||
|
- npm_token
|
||||||
|
when:
|
||||||
|
event: [push, manual]
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
release-gitea:
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://src.mfgames.com
|
||||||
|
files:
|
||||||
|
- "*.pdf"
|
||||||
|
- "*.epub"
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
tag: v*
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
# !/usr/bin/env bash
|
||||||
rdlkf() { [ -L "$1" ] && (local lk="$(readlink "$1")"; local d="$(dirname "$1")"; cd "$d"; local l="$(rdlkf "$lk")"; ([[ "$l" = /* ]] && echo "$l" || echo "$d/$l")) || echo "$1"; }
|
rdlkf() { [ -L "$1" ] && (local lk="$(readlink "$1")"; local d="$(dirname "$1")"; cd "$d"; local l="$(rdlkf "$lk")"; ([[ "$l" = /* ]] && echo "$l" || echo "$d/$l")) || echo "$1"; }
|
||||||
DIR="$(dirname "$(rdlkf "$0")")"
|
DIR="$(dirname "$(rdlkf "$0")")"
|
||||||
exec /usr/bin/env node --harmony "$DIR/../lib/cli.js" "$@"
|
exec /usr/bin/env node --harmony "$DIR/../lib/cli.js" "$@"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
# !/usr/bin/env bash
|
||||||
rdlkf() { [ -L "$1" ] && (local lk="$(readlink "$1")"; local d="$(dirname "$1")"; cd "$d"; local l="$(rdlkf "$lk")"; ([[ "$l" = /* ]] && echo "$l" || echo "$d/$l")) || echo "$1"; }
|
rdlkf() { [ -L "$1" ] && (local lk="$(readlink "$1")"; local d="$(dirname "$1")"; cd "$d"; local l="$(rdlkf "$lk")"; ([[ "$l" = /* ]] && echo "$l" || echo "$d/$l")) || echo "$1"; }
|
||||||
DIR="$(dirname "$(rdlkf "$0")")"
|
DIR="$(dirname "$(rdlkf "$0")")"
|
||||||
exec /usr/bin/env node --harmony "$DIR/../lib/cli.js" count "$@"
|
exec /usr/bin/env node --harmony "$DIR/../lib/cli.js" count "$@"
|
||||||
|
|
Loading…
Reference in a new issue