diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0f376b14..a1fd4db3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -60,11 +60,6 @@ jobs: - name: Set CGO_ENABLED run: echo "CGO_ENABLED=${{ matrix.cgo }}" >> $GITHUB_ENV - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: latest - - name: Test if: runner.os != 'Windows' run: .ci/scripts/test.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f0daa8dd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: release + +on: + workflow_dispatch: + inputs: + version: + description: Tag name (e.g. v1.2.3) for this version (does not need to exist). + required: true + type: string + last_release: + description: Last release tag. + required: true + type: string + +permissions: + contents: read + +jobs: + draft: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + ref: main + fetch-depth: 0 # Need full history. + + - name: release notes + run: >- + go run github.com/hashicorp/go-changelog/cmd/changelog-build@ba40b3a + -changelog-template .ci/release/changelog.gotmpl + -entries-dir ./.changelog + -note-template .ci/release/release-note.gotmpl + -last-release "${{ inputs.last_release }}" + -this-release HEAD | tee /tmp/release-notes.txt + + - name: draft GH release + run: >- + gh release create "${{ inputs.version }}" + --draft + --notes-file /tmp/release-notes.txt + --title "${{ inputs.version }}"