mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
action to auto cut github release (#43)
This commit is contained in:
27
.github/workflows/docker-publish.yml
vendored
27
.github/workflows/docker-publish.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
EXISTS: ${{ steps.check-version.outputs.EXISTS }}
|
EXISTS: ${{ steps.check-version.outputs.EXISTS }}
|
||||||
|
VERSION: ${{ steps.package-version.outputs.VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -66,3 +67,29 @@ jobs:
|
|||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||||
with:
|
with:
|
||||||
args: rollout restart -n ${{ secrets.KUBE_NAMESPACE }} deploy/${{ secrets.KUBE_DEPLOYMENT }}
|
args: rollout restart -n ${{ secrets.KUBE_NAMESPACE }} deploy/${{ secrets.KUBE_DEPLOYMENT }}
|
||||||
|
|
||||||
|
create-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-and-push
|
||||||
|
if: needs.build-and-push.outputs.EXISTS == 'false'
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create GitHub release
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
VERSION: ${{ needs.build-and-push.outputs.VERSION }}
|
||||||
|
run: |
|
||||||
|
# Extract release notes from CHANGELOG.md
|
||||||
|
notes=$(awk -v version="$VERSION" '
|
||||||
|
$0 ~ "## Version " version {flag=1;next}
|
||||||
|
$0 ~ "## Version " && flag {exit}
|
||||||
|
flag' CHANGELOG.md)
|
||||||
|
|
||||||
|
gh release create "v$VERSION" \
|
||||||
|
--repo="$GITHUB_REPOSITORY" \
|
||||||
|
--title="v$VERSION" \
|
||||||
|
--notes="$notes"
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.1.21
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- auto cut github release for new version
|
||||||
|
|
||||||
## Version 0.1.20
|
## Version 0.1.20
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "habittrove",
|
"name": "habittrove",
|
||||||
"version": "0.1.20",
|
"version": "0.1.21",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
|
|||||||
Reference in New Issue
Block a user