forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automate more of the release process (no-changelog) (n8n-io#10416)
- Loading branch information
Showing
12 changed files
with
109 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,7 @@ on: | |
- edited | ||
- synchronize | ||
branches: | ||
- '**' | ||
- '!release/*' | ||
- 'master' | ||
|
||
jobs: | ||
check-pr-title: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: Build, unit test and lint branch | ||
|
||
on: [pull_request] | ||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
- '!release/*' | ||
|
||
jobs: | ||
install-and-build: | ||
|
@@ -9,7 +13,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repository: n8n-io/n8n | ||
ref: refs/pull/${{ github.event.pull_request.number }}/merge | ||
|
||
- run: corepack enable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,6 @@ on: | |
- cron: '0 1 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
repository: | ||
description: 'GitHub repository to create image off.' | ||
required: true | ||
default: 'n8n-io/n8n' | ||
branch: | ||
description: 'GitHub branch to create image off.' | ||
required: true | ||
|
@@ -49,7 +45,6 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }} | ||
ref: ${{ github.event.inputs.branch || 'master' }} | ||
|
||
- name: Set up QEMU | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,6 @@ on: | |
required: false | ||
default: 'browsers:node18.12.0-chrome107' | ||
type: string | ||
cache-key: | ||
description: 'Cache key for modules and build artifacts.' | ||
required: false | ||
default: ${{ github.sha }}-${{ inputs.run-env }}-e2e-modules | ||
type: string | ||
record: | ||
description: 'Record test run.' | ||
required: false | ||
|
@@ -78,7 +73,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Checkout PR | ||
|
@@ -111,7 +105,7 @@ jobs: | |
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./packages/**/dist | ||
key: ${{ inputs.cache-key }} | ||
key: ${{ github.sha }}-e2e | ||
|
||
testing: | ||
runs-on: ubuntu-latest | ||
|
@@ -128,7 +122,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repository: n8n-io/n8n | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Checkout PR | ||
|
@@ -146,7 +139,7 @@ jobs: | |
/github/home/.cache | ||
/github/home/.pnpm-store | ||
./packages/**/dist | ||
key: ${{ inputs.cache-key }} | ||
key: ${{ github.sha }}-e2e | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repository: n8n-io/n8n | ||
ref: ${{ inputs.ref }} | ||
|
||
- run: corepack enable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,15 @@ on: | |
- 'release/*' | ||
|
||
jobs: | ||
publish-release: | ||
if: github.event.pull_request.merged == true | ||
publish-to-npm: | ||
name: Publish to NPM | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
timeout-minutes: 60 | ||
if: github.event.pull_request.merged == true | ||
timeout-minutes: 10 | ||
env: | ||
NPM_CONFIG_PROVENANCE: true | ||
|
||
outputs: | ||
release: ${{ steps.set-release.outputs.release }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -51,25 +48,97 @@ jobs: | |
pnpm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public --tag rc --no-git-checks | ||
npm dist-tag rm n8n rc | ||
- id: set-release | ||
run: echo "release=${{ env.RELEASE }}" >> $GITHUB_OUTPUT | ||
|
||
publish-to-docker-hub: | ||
name: Publish to DockerHub | ||
needs: [publish-to-npm] | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build | ||
uses: docker/[email protected] | ||
with: | ||
context: ./docker/images/n8n | ||
build-args: | | ||
N8N_VERSION=${{ needs.publish-to-npm.outputs.release }} | ||
platforms: linux/amd64,linux/arm64 | ||
provenance: false | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/n8n:${{ needs.publish-to-npm.outputs.release }} | ||
ghcr.io/${{ github.repository_owner }}/n8n:${{ needs.publish-to-npm.outputs.release }} | ||
create-github-release: | ||
name: Create a GitHub Release | ||
needs: [publish-to-npm, publish-to-docker-hub] | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
timeout-minutes: 5 | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Create a Release on GitHub | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
commit: ${{github.event.pull_request.base.ref}} | ||
tag: 'n8n@${{env.RELEASE}}' | ||
tag: 'n8n@${{ needs.publish-to-npm.outputs.release }}' | ||
prerelease: true | ||
makeLatest: false | ||
body: ${{github.event.pull_request.body}} | ||
|
||
trigger-release-note: | ||
name: Trigger a release note | ||
needs: [publish-to-npm, create-github-release] | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger a release note | ||
continue-on-error: true | ||
run: curl -u docsWorkflows:${{ secrets.N8N_WEBHOOK_DOCS_PASSWORD }} --request GET 'https://internal.users.n8n.cloud/webhook/trigger-release-note' --header 'Content-Type:application/json' --data '{"version":"${{env.RELEASE}}"}' | ||
|
||
# - name: Merge Release into 'master' | ||
# run: | | ||
# git fetch origin | ||
# git checkout --track origin/master | ||
# git config user.name "Jan Oberhauser" | ||
# git config user.email [email protected] | ||
# git merge --ff n8n@${{env.RELEASE}} | ||
# git push origin master | ||
# git push origin :${{github.event.pull_request.base.ref}} | ||
run: curl -u docsWorkflows:${{ secrets.N8N_WEBHOOK_DOCS_PASSWORD }} --request GET 'https://internal.users.n8n.cloud/webhook/trigger-release-note' --header 'Content-Type:application/json' --data '{"version":"${{ needs.publish-to-npm.outputs.release }}"}' | ||
|
||
merge-back-into-master: | ||
name: Merge back into master | ||
needs: [publish-to-npm, create-github-release] | ||
if: ${{ github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'release:patch') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- run: | | ||
git checkout --track origin/master | ||
git config user.name "github-actions[bot]" | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git merge --ff n8n@${{ needs.publish-to-npm.outputs.release }} | ||
git push origin master | ||
git push origin :${{github.event.pull_request.base.ref}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
repository: n8n-io/n8n | ||
ref: ${{ inputs.ref }} | ||
|
||
- run: corepack enable | ||
|