ci: Add stable and beta release channels (#13498)

This commit is contained in:
Tomi Turtiainen 2025-02-27 12:58:54 +02:00 committed by GitHub
parent d02c8b0d7d
commit ac3b388d18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,10 +11,10 @@ on:
description: 'Release channel' description: 'Release channel'
required: true required: true
type: choice type: choice
default: 'next' default: 'beta'
options: options:
- next - beta
- latest - stable
jobs: jobs:
release-to-npm: release-to-npm:
@ -25,9 +25,18 @@ jobs:
- uses: actions/setup-node@v4.2.0 - uses: actions/setup-node@v4.2.0
with: with:
node-version: 20.x node-version: 20.x
- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm dist-tag add n8n@${{ github.event.inputs.version }} ${{ github.event.inputs.release-channel }}
- if: github.event.inputs.release-channel == 'beta'
run: |
npm dist-tag add n8n@${{ github.event.inputs.version }} next
npm dist-tag add n8n@${{ github.event.inputs.version }} beta
- if: github.event.inputs.release-channel == 'stable'
run: |
npm dist-tag add n8n@${{ github.event.inputs.version }} latest
npm dist-tag add n8n@${{ github.event.inputs.version }} stable
release-to-docker-hub: release-to-docker-hub:
name: Release to DockerHub name: Release to DockerHub
@ -39,7 +48,15 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- run: docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.release-channel }} ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.version }} - if: github.event.inputs.release-channel == 'stable'
run: |
docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/n8n:stable ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.version }}
docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/n8n:latest ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.version }}
- if: github.event.inputs.release-channel == 'beta'
run: |
docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/n8n:beta ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.version }}
docker buildx imagetools create -t ${{ secrets.DOCKER_USERNAME }}/n8n:next ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.version }}
release-to-github-container-registry: release-to-github-container-registry:
name: Release to GitHub Container Registry name: Release to GitHub Container Registry
@ -52,7 +69,15 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- run: docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.release-channel }} ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.version }} - if: github.event.inputs.release-channel == 'stable'
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/n8n:stable ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.version }}
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/n8n:latest ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.version }}
- if: github.event.inputs.release-channel == 'beta'
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/n8n:beta ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.version }}
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/n8n:next ghcr.io/${{ github.repository_owner }}/n8n:${{ github.event.inputs.version }}
update-docs: update-docs:
name: Update latest and next in the docs name: Update latest and next in the docs