Merge pull request #5754 from leather-io/release/force-trigger #485
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: Create version | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '**' | |
paths-ignore: | |
- '**/CHANGELOG.md' | |
- '**/package.json' | |
- '**/pnpm-lock.yaml' | |
- './config/**' | |
- 'README.md' | |
env: | |
RUNNER_DEBUG: 1 | |
jobs: | |
semantic-release: | |
runs-on: ubuntu-latest | |
outputs: | |
new_release_published: ${{ steps.semantic.outputs.new_release_published }} | |
new_release_version: ${{ steps.semantic.outputs.new_release_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
- uses: ./.github/actions/provision | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Semantic Release | |
uses: cycjimmy/[email protected] | |
id: semantic | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
env: | |
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
with: | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
@semantic-release/release-notes-generator | |
- name: Create file with release notes | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: echo "${{ steps.semantic.outputs.new_release_notes }}" > release-notes.txt | |
- run: cat release-notes.txt | |
if: steps.semantic.outputs.new_release_published == 'true' | |
- name: Log details | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: | | |
echo ${{ steps.semantic.outputs.new_release_version }} | |
echo ${{ steps.semantic.outputs.new_release_major_version }} | |
echo ${{ steps.semantic.outputs.new_release_minor_version }} | |
echo ${{ steps.semantic.outputs.new_release_patch_version }} | |
- name: Upload release notes | |
uses: actions/upload-artifact@v3 | |
if: steps.semantic.outputs.new_release_published == 'true' | |
with: | |
name: release-notes | |
path: release-notes.txt | |
- name: Merge main -> dev | |
uses: devmasx/merge-branch@master | |
continue-on-error: true | |
with: | |
type: now | |
from_branch: main | |
target_branch: dev | |
message: 'chore: post-release merge back' | |
github_token: ${{ secrets.LEATHER_BOT }} |