name: release on: push: tags: - '*' jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: setup go uses: actions/setup-go@v5 with: go-version: '>=1.20.1' # Use the GitHub token for downloading private modules - name: Configure private token env: GH_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} run: | git config --global url."https://${GH_ACCESS_TOKEN}:x-oauth-basic@fj.ct-maru.mooo.com/".insteadOf "https://fj.ct-maru.mooo.com/" - name: release-build-linux run: go build -ldflags="-s -w -X main.Version=${{gitea.ref_name}}" -o bin/rmd - name: release-build-windows run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${{gitea.ref_name}}" -o bin/rmd-windows-amd64.exe - name: release-build-darwin run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.Version=${{gitea.ref_name}}" -o bin/rmd-darwin-amd64 - name: Build Changelog id: github_release uses: https://github.com/mikepenz/release-changelog-builder-action@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: platform: "gitea" baseUrl: "https://fj.ct-maru.mooo.com" mode: "COMMIT" configurationJson: | { "pr_template": "- #{{TITLE}}\n", "label_extractor": [ { "pattern": "(.+): (.+)", "target": "$1", "on_property": "title" } ], "transformers": [ { "pattern": "(.+): (.+)", "target": "$2", "on_property": "title" } ] } - name: Cut Release uses: https://github.com/akkuman/gitea-release-action@v1 with: files: |- bin/** body: ${{steps.github_release.outputs.changelog}}