name: release on: push: tags: - "*" jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: setup go uses: https://github.com/actions/setup-go@v4 with: go-version: '>=1.20.1' - name: Install go-gitea/changelog run: | wget https://dl.gitea.com/changelog-tool/main/changelog-main-linux-amd64 chmod +x changelog-main-linux-amd64 sudo mv changelog-main-linux-amd64 /usr/local/bin/changelog # - name: Generate changelog # id: changelog # run: | # VERSION="${GITHUB_REF_NAME}" # changelog generate -t="${VERSION}" -c="${GITHUB_WORKSPACE}/changelog.yml" > CHANGELOG.md # echo "changelog<> $GITHUB_OUTPUT # cat CHANGELOG.md >> $GITHUB_OUTPUT # echo "EOF" >> $GITHUB_OUTPUT # - name: Generate changelog # id: changelog # env: # CHANGELOG_TOKEN: ${{ secrets.CHANGELOG_TOKEN }} # run: #| # VERSION="${GITHUB_REF_NAME}" # changelog generate \ # -t="${VERSION}" \ # -c="${GITHUB_WORKSPACE}/changelog.yml" \ # --token="${CHANGELOG_TOKEN}" > CHANGELOG.md # # echo "changelog<> $GITHUB_OUTPUT # cat CHANGELOG.md >> $GITHUB_OUTPUT # echo "EOF" >> $GITHUB_OUTPUT - name: "Build Changelog" id: build_changelog uses: mikepenz/release-changelog-builder-action@{latest-release} - name: Create Gitea Release uses: akkuman/gitea-release-action@v1 with: token: ${{ secrets.GITEA_TOKEN }} tag_name: ${{ gitea.ref_name }} name: ${{ gitea.ref_name }} body: ${{ steps.changelog.outputs.changelog }}