Skip to content

build(deps): bump actions/checkout from 4 to 5 #9

build(deps): bump actions/checkout from 4 to 5

build(deps): bump actions/checkout from 4 to 5 #9

Workflow file for this run

name: Generate and Publish Manifest
on:
push:
tags: [ 'v*' ]
pull_request:
types: [closed]
branches: [main, master]
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Release v'))
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Extract version from tag
if: github.event_name == 'push'
run: |
VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Extract version from PR title
if: github.event_name == 'pull_request'
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
VERSION=$(echo "$PR_TITLE" | grep -oP 'Release v\K[0-9]+\.[0-9]+\.[0-9]+')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Validate version
run: |
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version format: $VERSION"
exit 1
fi
echo "Publishing version: $VERSION"
- name: Publish manifest and release
uses: version-fox/plugin-manifest-action@main
with:
version: ${{ env.VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}