Skip to content

Commit

Permalink
build(root): only release a single package
Browse files Browse the repository at this point in the history
But tag two repos (LAPIS and the docs).
#782 shows that configuring two separate packages in Release Please is not the correct approach.
We don't want separate versions for LAPIS and the docs.
  • Loading branch information
fengelniederhammer committed May 8, 2024
1 parent e29bee1 commit c2472fa
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 64 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/release-lapis2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,39 @@ jobs:

- name: Inspect Release Outputs
run: |
echo '${{ toJson(steps.release.outputs) }}'
cat <<'EOF'
${{ toJson(steps.release.outputs) }}
EOF
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.release_created }}

- name: Set up Docker Buildx
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Wait for Lapis 2 Docs Docker Image
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.release_created }}
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.sha }}
check-name: Build Docs Docker Image And Run E2E Tests
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Tag Already Built Images With Release Tags
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.release_created }}
run: |
MAJOR=${{ steps.release.outputs.lapis2--major }}
MINOR=${{ steps.release.outputs.lapis2--minor }}
PATCH=${{ steps.release.outputs.lapis2--patch }}
MAJOR=${{ steps.release.outputs.major }}
MINOR=${{ steps.release.outputs.minor }}
PATCH=${{ steps.release.outputs.patch }}
TAGS=("$MAJOR.$MINOR" "$MAJOR.$MINOR.$PATCH")
# TODO (#777) include $MAJOR only for releases >= 1.0
# TAGS=("$MAJOR" "$MAJOR.$MINOR" "$MAJOR.$MINOR.$PATCH") - don't include major-only for pre-1.0
Expand Down
3 changes: 1 addition & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"lapis2": "0.1.0",
"lapis2-docs": "0.1.0"
".": "0.1.0"
}
File renamed without changes.
48 changes: 0 additions & 48 deletions lapis2-docs/CHANGELOG.md

This file was deleted.

22 changes: 17 additions & 5 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
{
"include-component-in-tag": true,
"packages": {
"lapis2": {
".": {
"release-type": "simple",
"extra-files": [
"build.gradle"
"lapis2/build.gradle",
{
"type": "json",
"path": "lapis2-docs/package.json",
"jsonpath": "$.version"
},
{
"type": "json",
"path": "lapis2-docs/package-lock.json",
"jsonpath": "$.version"
},
{
"type": "json",
"path": "lapis2-docs/package-lock.json",
"jsonpath": "$.packages..version"
}
]
},
"lapis2-docs": {
"release-type": "node"
}
},
"bump-minor-pre-major": true,
Expand Down

0 comments on commit c2472fa

Please sign in to comment.