Skip to content

build: refactor release process #1

build: refactor release process

build: refactor release process #1

name: Release from main branch
on:
push:
branches:
- 'main'
jobs:
release:
runs-on: ubuntu-latest
if: >
(
startsWith(github.event.head_commit.message, 'feat') ||
startsWith(github.event.head_commit.message, 'fix') ||
startsWith(github.event.head_commit.message, 'refactor') ||
contains(github.event.head_commit.message, '!release')
)
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: sbb-esta
- name: 'Yarn: Install dependencies'
run: yarn install --frozen-lockfile --non-interactive
- name: 'Release: Set git user'
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
- name: 'Release: Create release with commit-and-tag-version'
run: yarn commit-and-tag-version
- name: 'Release: Push release to repository'
run: git push --follow-tags origin main