feat: add workflow for release handling
All checks were successful
Update changelog / changelog (push) Successful in 26s
All checks were successful
Update changelog / changelog (push) Successful in 26s
This commit is contained in:
35
.gitea/workflows/02_release.yml
Normal file
35
.gitea/workflows/02_release.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# Credit: https://gitea.com/gitea/runner-images/src/branch/main/.gitea/workflows/release.yaml
|
||||
name: Release new version
|
||||
run-name: Release ${{ github.ref_name }}
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
container: docker.io/thegeeklab/git-sv:2.0.9
|
||||
steps:
|
||||
- name: Install tools
|
||||
run: |
|
||||
apk add -q --update --no-cache nodejs
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-tags: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create changelog
|
||||
run: |
|
||||
git sv current-version
|
||||
git sv release-notes -t ${GITHUB_REF#refs/tags/} -o CHANGELOG.md
|
||||
sed -i '1,2d' CHANGELOG.md # remove version
|
||||
cat CHANGELOG.md
|
||||
|
||||
- name: Release
|
||||
uses: https://github.com/akkuman/gitea-release-action@v1
|
||||
with:
|
||||
body_path: CHANGELOG.md
|
||||
token: "${{ secrets.REPO_RW_TOKEN }}"
|
||||
@@ -34,4 +34,4 @@ jobs:
|
||||
curl -s -X POST "https://gitea.7o7.cx/api/v1/repos/sherl/Shadow/issues" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA" > /dev/null
|
||||
else
|
||||
curl -s -X PATCH "https://gitea.7o7.cx/api/v1/repos/sherl/Shadow/issues/$ISSUE_NUMBER" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA" > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user