Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master
- dev
workflow_run:
workflows:
workflows:
- Update API client
- Update API client (dev)
types:
Expand All @@ -22,8 +22,10 @@ permissions:
jobs:
publish:
if:
(github.event.workflow_run.name == 'Update API client' || github.event.pull_request.base.ref == 'master') &&
(github.event.pull_request.merged == true || github.event.workflow_run.conclusion == 'success')
(github.event.workflow_run.name == 'Update API client' ||
github.event.pull_request.base.ref == 'master') &&
(github.event.pull_request.merged == true ||
github.event.workflow_run.conclusion == 'success')
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -79,6 +81,11 @@ jobs:
github.event.workflow_run.head_branch == 'master' || github.ref ==
'refs/heads/master'
run: |
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" != "master" ]; then
echo "::error::Refusing to publish a release from '$branch'"
exit 1
fi
git describe --exact-match --tags || code=$?
if [ "${code:-0}" -eq 128 ]; then
yarn lerna publish \
Expand All @@ -90,10 +97,10 @@ jobs:
--tag-version-prefix ""
fi


publish-dev:
if:
github.event.workflow_run.name == 'Update API client (dev)' && github.event.workflow_run.conclusion == 'success'
github.event.workflow_run.name == 'Update API client (dev)' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest

env:
Expand All @@ -106,7 +113,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.PUBLISH_PAT }}
ref: ${{ github.event.workflow_run.head_branch }}
ref: dev

- name: Setup Node 🎛️
uses: actions/setup-node@v6
Expand All @@ -128,14 +135,6 @@ jobs:
with:
main-branch-name: dev

# This step is needed for nx affected to work when CI is running on a PR
# See also https://nx.dev/ci/recipes/set-up/monorepo-ci-github-actions#configuring-ci-using-github-actions-and-nx
- name: Setup NX 2/2 🎛
if:
(github.ref != 'refs/heads/dev' &&
github.event.workflow_run.head_branch != 'dev')
run: git branch --track dev origin/dev

- name: Build 🔨
run: yarn nx affected -t build --parallel=3

Expand All @@ -147,6 +146,11 @@ jobs:

- name: Version and publish 🚀
run: |
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" != "dev" ]; then
echo "::error::Refusing to publish a development version from '$branch'"
exit 1
fi
git describe --exact-match --tags || code=$?
if [ "${code:-0}" -eq 128 ]; then
yarn lerna publish 0.0.0-development-$(git rev-parse --short=7 HEAD)-$(date +%Y%m%d) \
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"packages": [
"packages/*"
],
"version": "0.0.0-development-f13d74a-20260826.0"
"version": "4.448.0"
}
2 changes: 1 addition & 1 deletion packages/commons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mittwald/api-client-commons",
"version": "0.0.0-development-f13d74a-20260826.0",
"version": "4.448.0",
"author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
"type": "module",
"description": "Common types and utilities for mittwald API clients",
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mittwald/api-code-generator",
"version": "0.0.0-development-f13d74a-20260826.0",
"version": "4.448.0",
"type": "module",
"repository": "https://github.com/mittwald/api-client-js.git",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mittwald/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mittwald/api-client",
"version": "0.0.0-development-f13d74a-20260826.0",
"version": "4.448.0",
"author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
"type": "module",
"description": "Auto-generated client for the mittwald API",
Expand Down
2 changes: 1 addition & 1 deletion packages/models/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mittwald/api-models",
"version": "0.0.0-development-f13d74a-20260826.0",
"version": "4.448.0",
"author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
"type": "module",
"description": "Collection of domain models for coherent interaction with the API",
Expand Down
Loading