From 6a491040a5912c9700e9872568082d0a945e1b61 Mon Sep 17 00:00:00 2001 From: Thomas Vaillant <8985674+thomvaill@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:55:34 +0100 Subject: [PATCH] ci: fix post release jobs --- .github/workflows/build.yml | 2 ++ .../post-release-docker-hub-alpha.yml | 26 +++++++++++++++++++ .github/workflows/post-release-docker-hub.yml | 23 ---------------- .github/workflows/post-release-e2e-alpha.yml | 4 +-- .github/workflows/post-release-e2e.yml | 1 + lerna.json | 2 +- 6 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/post-release-docker-hub-alpha.yml delete mode 100644 .github/workflows/post-release-docker-hub.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c57c54c..bd84324 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,8 @@ on: - develop paths: - "packages/**" + - "!packages/**/CHANGELOG.md" # filters out changes made by lerna + - "!packages/**/package.json" # filters out changes made by lerna - ".github/workflows/build.yml" defaults: diff --git a/.github/workflows/post-release-docker-hub-alpha.yml b/.github/workflows/post-release-docker-hub-alpha.yml new file mode 100644 index 0000000..4eda92e --- /dev/null +++ b/.github/workflows/post-release-docker-hub-alpha.yml @@ -0,0 +1,26 @@ +name: Post-release Docker Hub alpha +on: + workflow_dispatch: + + # Run after every alpha release to NPM + push: + tags: + - v*-alpha.* + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: build and release the latest alpha Docker image + run: | + make -C docker release version-tag + docker image tag "thomvaill/log4brains:$(make -C docker print-utag)" thomvaill/log4brains:alpha + docker image push thomvaill/log4brains:alpha diff --git a/.github/workflows/post-release-docker-hub.yml b/.github/workflows/post-release-docker-hub.yml deleted file mode 100644 index 724f552..0000000 --- a/.github/workflows/post-release-docker-hub.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Post-release Docker Hub -on: - workflow_dispatch: - - # Run after every release to NPM - push: - tags: - - v* - -jobs: - build-and-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: build and release the latest Docker image - run: make -C docker release version-tag branch-tag diff --git a/.github/workflows/post-release-e2e-alpha.yml b/.github/workflows/post-release-e2e-alpha.yml index d3105bd..36b3569 100644 --- a/.github/workflows/post-release-e2e-alpha.yml +++ b/.github/workflows/post-release-e2e-alpha.yml @@ -2,10 +2,10 @@ name: Post-release E2E alpha on: workflow_dispatch: - # Run after every release to NPM + # Run after every alpha release to NPM push: tags: - - v* + - v*-alpha.* jobs: e2e: diff --git a/.github/workflows/post-release-e2e.yml b/.github/workflows/post-release-e2e.yml index 6b7287e..69fed23 100644 --- a/.github/workflows/post-release-e2e.yml +++ b/.github/workflows/post-release-e2e.yml @@ -6,6 +6,7 @@ on: push: tags: - v* + - "!v*-alpha.*" # Run on every Wednesday to check possible regressions caused by dependency updates # Like this one: https://github.com/thomvaill/log4brains/issues/27 diff --git a/lerna.json b/lerna.json index 1d710a3..be270c6 100644 --- a/lerna.json +++ b/lerna.json @@ -7,7 +7,7 @@ ], "command": { "version": { - "message": "chore(release): publish %s [skip ci]", + "message": "chore(release): publish %s", "allowBranch": "develop" } }