Skip to content

Commit

Permalink
Merge pull request #588 from hoogi91/feature/release-workflow
Browse files Browse the repository at this point in the history
Add new release process
  • Loading branch information
hoogi91 authored Aug 12, 2024
2 parents 060ddc1 + 62f8bf2 commit 66a2c74
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Release new version"
on:
workflow_dispatch:
inputs:
type:
description: 'Release type'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
latest-release:
description: 'Is latest release?'
required: false
default: true
type: boolean

jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- id: bump-version
run: |
VERSION=${{ format('steps.semvers.outputs.{0}', inputs.type) }}
sed -i -E "s/'[0-9]+.[0-9]+.[0-9]+'/'$VERSION'/g" ext_emconf.php
sed -i -E "s/[0-9]+.[0-9]+.[0-9]+/$VERSION/g" Documentation/Settings.cfg
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: https://github.com/hoogi91/spreadsheets/releases/tag/${{ steps.bump-version.outputs.version }}
- run: gh release create ${{ steps.bump-version.outputs.version }} --generate-notes --draft=true --latest=${{ inputs.latest-release }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
environment: 'github'
needs: [bump-version]
steps:
- run: gh release edit ${{ steps.bump-version.outputs.version }} --draft=false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: tomasnorre/typo3-upload-ter@v2
with:
api-token: ${{ secrets.TYPO3_API_TOKEN }}

0 comments on commit 66a2c74

Please sign in to comment.