Files
Wand-Enhancer-k1tbyte/.github/workflows/release.yml
T
kitbyte 8b83750bf2 chore(release): prepare 2.0.0.0 and support pre-release tags
Bump AssemblyInfo to 2.0.0.0 and add the 2.0.0.0 changelog section.
Resolve a tag suffix (2.0.0.0-rc.1) to its base version so release metadata
validation and changelog extraction accept pre-release tags.
Publish suffixed tags as a pre-release and keep them off "Latest release".
2026-08-29 17:34:16 +03:00

57 lines
1.5 KiB
YAML

name: Release
on:
push:
tags:
- '*'
jobs:
publish-release:
if: github.repository == 'k1tbyte/Wand-Enhancer'
runs-on: windows-latest
permissions:
contents: write
env:
RELEASE_VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: pnpm/action-setup@v5
with:
version: 10
- uses: actions/setup-node@v5
with:
node-version: 22
cache: pnpm
cache-dependency-path: web-panel/pnpm-lock.yaml
- name: Validate release metadata
shell: pwsh
run: ./scripts/validate-release-metadata.ps1 -ExpectedVersion $env:RELEASE_VERSION
- name: Extract release notes from changelog
shell: pwsh
run: ./scripts/get-changelog-section.ps1 -Version $env:RELEASE_VERSION -OutputPath release-notes.md
- name: Build release
shell: pwsh
run: ./build.ps1 -Configuration Release
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
body_path: release-notes.md
files: CHANGELOG.md
fail_on_unmatched_files: true
# A tag carrying a suffix (1.1.0.0-rc.1) publishes as a pre-release and
# does not become the "Latest release" on the repository page.
prerelease: ${{ contains(github.ref_name, '-') }}
make_latest: ${{ !contains(github.ref_name, '-') }}