44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Create release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
- release/**
|
|
|
|
jobs:
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# Fetch all tags
|
|
fetch-depth: 0
|
|
|
|
- name: Read version file
|
|
run: echo "CURRENT_VERSION=$(cat VERSION)" >> $GITHUB_ENV
|
|
|
|
- name: Get next version
|
|
id: next-version
|
|
uses: symless/next-version-action@master
|
|
with:
|
|
current-version: ${{ env.CURRENT_VERSION }}
|
|
|
|
- name: Print next version
|
|
run: echo ${{ steps.next-version.outputs.next-version }}
|
|
|
|
- name: Create release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
|
|
with:
|
|
tag_name: ${{ steps.next-version.outputs.next-version }}
|
|
release_name: ${{ steps.next-version.outputs.next-version }}
|
|
draft: false
|
|
prerelease: ${{ !startsWith(github.ref, 'refs/heads/release') }}
|