From fe20bdc7031e3aa4caf640cd4d766a82e4262fc9 Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Sun, 11 Aug 2024 08:50:35 +0200 Subject: [PATCH] semantic-release-action --- .github/workflows/docker.yml | 9 ++++++++- .releaserc.yml | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .releaserc.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f5e0b02a..f4a62fc6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest permissions: - contents: read + contents: write # 'write' required for semantic-release-action packages: write attestations: write id-token: write @@ -28,6 +28,13 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + # will generate a git tag => then, used by docker/metadata-action + - name: Semantic Release + id: semantic_release + uses: cycjimmy/semantic-release-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 diff --git a/.releaserc.yml b/.releaserc.yml new file mode 100644 index 00000000..8c9f61d2 --- /dev/null +++ b/.releaserc.yml @@ -0,0 +1,20 @@ +# default +branches: + - '+([0-9])?(.{+([0-9]),x}).x' + - master + - main + - next + - next-major + - name: beta + prerelease: true + - name: alpha + prerelease: true + # ADDed + - name: app-router + prerelease: true +branch: main + +plugins: + - '@semantic-release/github': + successComment: false + failTitle: false