Files
portabase/.github/workflows/auto-release.yml
T
044edcda07 fix: workflow
* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
2026-03-06 09:48:32 +01:00

56 lines
1.4 KiB
YAML

name: Auto Release bot
on:
pull_request:
types: [ closed ]
branches:
- main
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.base_ref }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: git config --global user.name 'github-actions[bot]'
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# - name: Run release-it
# id: release_step
# run: |
# git pull origin main
# pnpm exec release-it --ci
# env:
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Create tag only
run: pnpm exec release-it --ci --no-github
- name: Push tag
run: git push origin v$(pnpm exec release-it --ci --dry-run | grep 'next version' | awk '{print $NF}')
- name: Create GitHub release
run: pnpm exec release-it --ci --no-npm