Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ce5c1aa1b | |||
| 4174857ccd | |||
| aefcd96f8c | |||
| a02212374f | |||
| 0cccf1870e | |||
| 5edda37114 | |||
|
|
2b75a624fd | ||
|
|
00242568d0 | ||
|
|
b1650a1738 | ||
|
|
02634dca9b | ||
|
|
90e5ff4b52 | ||
|
|
2902fd0f90 | ||
|
|
4fe21b0430 | ||
|
|
30cc00ca8f | ||
|
|
1b65438e71 | ||
|
|
bbaf5af45c | ||
|
|
3ae14fb1fd | ||
|
|
5dd6aeb737 | ||
|
|
307c1bb715 | ||
|
|
22e64b6dec | ||
| 873a4c5237 | |||
|
|
ea0511ae49 | ||
|
|
e9235bb816 | ||
|
|
888cae3db2 | ||
|
|
78253e9314 | ||
|
|
77662b71d2 | ||
|
|
207f392e80 | ||
|
|
507a24eb3d | ||
| 4282359e54 | |||
| 6d46193f5d | |||
| b8c6ba1355 |
@@ -1,58 +1,61 @@
|
|||||||
---
|
name: release
|
||||||
name: gitea-release-action
|
|
||||||
description: "An action to support publishing release to Gitea."
|
on:
|
||||||
author: "Akkuman"
|
push:
|
||||||
inputs:
|
tags:
|
||||||
server_url:
|
- "*"
|
||||||
description: the base url of the gitea API
|
|
||||||
required: false
|
jobs:
|
||||||
default: ${{ github.server_url }}
|
release:
|
||||||
body:
|
runs-on: ubuntu-latest
|
||||||
description: "Note-worthy description of changes in release"
|
|
||||||
required: false
|
steps:
|
||||||
default: ${{ github.event.release.body != '' && github.event.release.body || null }}
|
- uses: actions/checkout@v4
|
||||||
body_path:
|
with:
|
||||||
description: "Path to load description of changes in this release"
|
fetch-depth: 0
|
||||||
required: false
|
- name: setup go
|
||||||
name:
|
uses: https://github.com/actions/setup-go@v4
|
||||||
description: "Gives the release a custom name. Defaults to tag name"
|
with:
|
||||||
required: false
|
go-version: '>=1.20.1'
|
||||||
default: ${{ github.event.release.name != '' && github.event.release.name || github.ref_name }}
|
|
||||||
tag_name:
|
- name: Install go-gitea/changelog
|
||||||
description: "Gives a tag name. Defaults to github.GITHUB_REF"
|
run: |
|
||||||
required: false
|
wget https://dl.gitea.com/changelog-tool/main/changelog-main-linux-amd64
|
||||||
default: ${{ github.ref_name }}
|
chmod +x changelog-main-linux-amd64
|
||||||
draft:
|
sudo mv changelog-main-linux-amd64 /usr/local/bin/changelog
|
||||||
description: "Creates a draft release. Defaults to false"
|
|
||||||
required: false
|
- name: Generate changelog
|
||||||
default: ${{ github.event.release.draft || false }}
|
id: changelog
|
||||||
prerelease:
|
run: |
|
||||||
description: "Identify the release as a prerelease. Defaults to false"
|
VERSION="${GITHUB_REF_NAME}"
|
||||||
required: false
|
changelog generate -t="${VERSION}" -c="${GITHUB_WORKSPACE}/changelog.yml" > CHANGELOG.md
|
||||||
default: ${{ github.event.release.prerelease || false }}
|
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
||||||
files:
|
cat CHANGELOG.md >> $GITHUB_OUTPUT
|
||||||
description: "Newline-delimited list of path globs for asset files to upload"
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
required: false
|
- name: Generate changelog
|
||||||
repository:
|
id: changelog
|
||||||
description: "Repository to make releases against, in <owner>/<repo> format"
|
env:
|
||||||
required: false
|
CHANGELOG_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
|
||||||
default: ${{ github.repository }}
|
run: #|
|
||||||
token:
|
VERSION="${GITHUB_REF_NAME}"
|
||||||
description: "Gitea Token"
|
changelog generate \
|
||||||
required: false
|
-t="${VERSION}" \
|
||||||
default: ${{ github.token }}
|
-m="${VERSION}" \
|
||||||
target_commitish:
|
-c="${GITHUB_WORKSPACE}/changelog.yml" \
|
||||||
description: 'Commitish value that determines where the Git tag is created from. Can be any branch or commit SHA.'
|
--token="${CHANGELOG_TOKEN}" > CHANGELOG.md
|
||||||
required: false
|
|
||||||
md5sum:
|
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
||||||
description: 'Publish `.md5` along with artifacts.'
|
cat CHANGELOG.md >> $GITHUB_OUTPUT
|
||||||
required: false
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
sha256sum:
|
|
||||||
description: 'Publish `.sha256` along with artifacts.'
|
- name: "Build Changelog"
|
||||||
required: false
|
id: build_changelog
|
||||||
runs:
|
uses: mikepenz/release-changelog-builder-action@v6.1.0
|
||||||
using: "node16"
|
|
||||||
main: "dist/index.js"
|
- name: Create Gitea Release
|
||||||
branding:
|
uses: akkuman/gitea-release-action@v1
|
||||||
color: "green"
|
with:
|
||||||
icon: "package"
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
tag_name: ${{ gitea.ref_name }}
|
||||||
|
name: ${{ gitea.ref_name }}
|
||||||
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
|
|||||||
63
changelog.yml
Normal file
63
changelog.yml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# The full repository name
|
||||||
|
repo: timmybee/test-release-merging
|
||||||
|
|
||||||
|
# Service type (gitea or github)
|
||||||
|
service: gitea
|
||||||
|
|
||||||
|
# Base URL for Gitea instance if using gitea service type (optional)
|
||||||
|
# Default: https://gitea.com
|
||||||
|
base-url: https://git.timmybee.xyz
|
||||||
|
|
||||||
|
groups:
|
||||||
|
-
|
||||||
|
name: BREAKING
|
||||||
|
labels:
|
||||||
|
- pr/breaking
|
||||||
|
-
|
||||||
|
name: FEATURES
|
||||||
|
labels:
|
||||||
|
- type/feature
|
||||||
|
-
|
||||||
|
name: API
|
||||||
|
labels:
|
||||||
|
- modifies/api
|
||||||
|
-
|
||||||
|
name: BUGFIXES
|
||||||
|
labels:
|
||||||
|
- type/bug
|
||||||
|
-
|
||||||
|
name: ENHANCEMENTS
|
||||||
|
labels:
|
||||||
|
- type/enhancement
|
||||||
|
- type/refactoring
|
||||||
|
- topic/ui
|
||||||
|
- topic/ui-interaction
|
||||||
|
- performance/speed
|
||||||
|
-
|
||||||
|
name: SECURITY
|
||||||
|
labels:
|
||||||
|
- topic/security
|
||||||
|
-
|
||||||
|
name: TESTING
|
||||||
|
labels:
|
||||||
|
- type/testing
|
||||||
|
-
|
||||||
|
name: TRANSLATION
|
||||||
|
labels:
|
||||||
|
- modifies/translation
|
||||||
|
-
|
||||||
|
name: BUILD
|
||||||
|
labels:
|
||||||
|
- topic/build
|
||||||
|
- topic/code-linting
|
||||||
|
-
|
||||||
|
name: DOCS
|
||||||
|
labels:
|
||||||
|
- type/docs
|
||||||
|
- modifies/docs
|
||||||
|
-
|
||||||
|
name: MISC
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# regex indicating which labels to skip for the changelog
|
||||||
|
skip-labels: skip-changelog|backport\/.+
|
||||||
17
release
Executable file
17
release
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION="$1"
|
||||||
|
MESSAGE="$2"
|
||||||
|
|
||||||
|
if [ -z "$VERSION" ] || [ -z "$MESSAGE" ]; then
|
||||||
|
echo "Usage: $0 <version> <commit message>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git add .
|
||||||
|
git commit -m "$MESSAGE"
|
||||||
|
git tag -a "$VERSION" -m "$VERSION"
|
||||||
|
git push
|
||||||
|
git push --tags
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
1
|
t;dosifnvposdifnv1
|
||||||
|
|||||||
Reference in New Issue
Block a user