name: Release on: push: tags: - 'v*' # Reagiere auf Tags wie v1.0.0 jobs: release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Set up Go (required for git-chglog) uses: actions/setup-go@v4 with: go-version: '1.21' - name: Install git-chglog run: | curl -sSL https://github.com/git-chglog/git-chglog/releases/latest/download/git-chglog_linux_amd64 -o git-chglog chmod +x git-chglog sudo mv git-chglog /usr/local/bin/ - name: Generate CHANGELOG.md for current tag run: | VERSION=$(git describe --tags --abbrev=0) git-chglog -o CHANGELOG.md "$VERSION" - name: Extract repository info run: | echo "REPO=${GITEA_REPOSITORY#*/}" >> $GITEA_ENV echo "OWNER=${GITEA_REPOSITORY%/*}" >> $GITEA_ENV - name: Create Gitea release uses: https://gitea.com/actions/release-action@main with: api_key: ${{ secrets.TOKEN }} owner: ${{ env.OWNER }} repo: ${{ env.REPO }} tag: ${{ github.ref_name }} body_file: CHANGELOG.md