mirror of
https://github.com/efremidze/swift-architecture-skill.git
synced 2026-09-14 20:49:06 +08:00
47bea451d2
This reverts commit e57919ed0b.
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
description: 'Version bump (patch, minor, major)'
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- patch
|
|
- minor
|
|
- major
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Ensure main branch
|
|
run: |
|
|
if [ "${GITHUB_REF}" != "refs/heads/main" ]; then
|
|
echo "Release workflow must run from main, got ${GITHUB_REF}"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Bump and push tag
|
|
id: tag_version
|
|
uses: mathieudutour/github-tag-action@v6.2
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
release_branches: main
|
|
default_bump: ${{ inputs.bump }}
|
|
tag_prefix: v
|
|
|
|
- name: Create GitHub release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
|
generate_release_notes: true
|