Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create release
on:
push:
branches:
- master
paths:
- "VERSION"

permissions:
contents: write

jobs:
tag-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Read tag from version file
id: version
run: |
if [ ! -f VERSION ]; then
echo "::error::VERSION not found"
exit 1
fi
TAG_NAME=$(cat VERSION)
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT

- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag_name }}
generate_release_notes: true
make_latest: "true"
42 changes: 42 additions & 0 deletions .github/workflows/release-create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Create release PR

on:
schedule:
- cron: "0 3 * * 1"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
Comment thread
TenSt marked this conversation as resolved.

- name: Increment version
id: version
run: |
DOC_FILE="docs/v3/openapi.json docs/admin/openapi.json"
CLOWDER_FILE=deploy/clowdapp.yaml
VERSION=$(cat VERSION)
[ "$(git log -1 --pretty=%B)" == "$VERSION" ] && exit 0
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
RELEASE_TYPE=$(git log -1 | tail -n1) # Check release type (/major, /minor, /patch (default))
VERSION_NEXT=$(./scripts/increment_version.sh $VERSION $RELEASE_TYPE)
sed -i 's|\("version": "\)[^"]*\("\)$|'"\1$VERSION_NEXT\2|;" $DOC_FILE
echo $VERSION_NEXT > VERSION
echo "VERSION_NEXT=$VERSION_NEXT" >> $GITHUB_OUTPUT

- name: Create PR for new release
uses: peter-evans/create-pull-request@v8
if: steps.version.outputs.VERSION_NEXT != ''
with:
base: master
branch: update-semantic-release-${{ steps.version.outputs.VERSION_NEXT }}
commit-message: "Update semantic release to ${{ steps.version.outputs.VERSION_NEXT }}"
title: "Update semantic release to ${{ steps.version.outputs.VERSION_NEXT }}"
token: ${{ secrets.VMAAS_BOT_TOKEN }}
body: |
New semantic release version **${{ steps.version.outputs.VERSION_NEXT }}** is available.
30 changes: 0 additions & 30 deletions .github/workflows/semantic-release.yml

This file was deleted.

Loading