adjust github auth (#230) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release by Changelog | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to create a release from' | |
required: true | |
default: 'main' | |
version: | |
description: 'Specify the semantic version for the release (vX.Y.Z)' | |
required: true | |
reason: | |
description: 'Reason for the manual release' | |
required: false | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
GOPROXY: proxy.golang.org,direct | |
GOPRIVATE: github.com/c2fo,github.com/C2FO | |
# Give the workflow permission to read/write contents if needed | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch || github.ref_name }} | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.24 | |
- name: Configure git for private modules | |
run: | | |
go env -w GOPRIVATE=github.com/c2fo,github.com/C2FO | |
git config --global url."https://${{ secrets.GITHUB_TOKEN }}:[email protected]/".insteadOf "https://github.com/" | |
- name: Install and run ReleaseGen | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_REF_NAME: ${{ github.event.inputs.branch || github.ref_name }} | |
MANUAL_VERSION: ${{ github.event.inputs.version || '' }} | |
REASON: ${{ github.event.inputs.reason || '' }} | |
CUSTOM_CHANGE_TYPES: | | |
documentation:patch | |
run: | | |
go install github.com/c2fo/ep-tools/releasegen@latest | |
releasegen |