Files
actions-ansi-to-html/.gitea/workflows/release.yml
T
Trez.One 31e1870ea1
Renovate / renovate (push) Failing after 4m6s
Release Bundled Action / release (push) Failing after 10s
chore: initial setup for fork release workflow.
2025-11-19 10:29:42 -05:00

74 lines
2.1 KiB
YAML

name: Release Bundled Action
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# 1️⃣ Checkout repository
- uses: actions/checkout@v4
# 2️⃣ Set up Node
- uses: actions/setup-node@v4
with:
node-version: 20
# 3️⃣ Install dependencies
- run: npm ci
# 4️⃣ Bundle the action via ncc
- uses: vercel/ncc@v0.34.0
with:
command: build
input: action.js
output: dist
# 5️⃣ Commit dist/ back to repo
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Build dist for release ${{ github.ref_name }}"
file_pattern: dist/**
branch: ${{ github.ref_name }}
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
push: true
# 6️⃣ Create Gitea release & generate changelog/release notes
- name: Gitea Release & Versioning
uses: joaquinjsb/gitea-release-please-action@v4
id: gitea_release
with:
token: ${{ secrets.GITEA_TOKEN }}
release-type: simple
github-api-url: ${{ secrets.GITEA_API_URL }}
branch: ${{ github.ref_name }}
config-file: release-please-config.json
# 7️⃣ Create GitHub release with release notes
- name: Create GitHub Release
uses: actions/create-release@v2
with:
tag_name: ${{ steps.gitea_release.outputs.tag_name }}
release_name: "Release ${{ steps.gitea_release.outputs.tag_name }}"
body: ${{ steps.gitea_release.outputs.release_notes }}
draft: false
prerelease: false
# 8️⃣ Auto-update major tag for workflows
- name: Update major version tag
run: |
tag="${{ steps.gitea_release.outputs.tag_name }}"
major="v${tag#v}"
major="${major%%.*}"
echo "Updating major tag: $major → $tag"
git tag -f "$major"
git push -f origin "$major"