release: Add Ask assistant to 1.54.0 release #238
Workflow file for this run
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
name: 'Release: Publish' | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'release/*' | |
jobs: | |
publish-release: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
timeout-minutes: 60 | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- run: corepack enable | |
- uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- name: Set release version in env | |
run: echo "RELEASE=$(node -e 'console.log(require("./package.json").version)')" >> $GITHUB_ENV | |
- name: Build | |
run: pnpm build | |
- name: Dry-run publishing | |
run: pnpm publish -r --no-git-checks --dry-run | |
- name: Publish to NPM | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
node .github/scripts/trim-fe-packageJson.js | |
node .github/scripts/ensure-provenance-fields.mjs | |
sed -i "s/default: 'dev'/default: 'stable'/g" packages/cli/dist/config/schema.js | |
pnpm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public --tag rc --no-git-checks | |
npm dist-tag rm n8n rc | |
- name: Create a Release on GitHub | |
uses: ncipollo/release-action@v1 | |
with: | |
commit: ${{github.event.pull_request.base.ref}} | |
tag: 'n8n@${{env.RELEASE}}' | |
prerelease: true | |
makeLatest: false | |
body: ${{github.event.pull_request.body}} | |
- 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}} |