diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..96f72f7 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: MIT + +name: release + +on: + push: + # run only against tags + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + with: + fetch-depth: 0 + + - run: git fetch --force --tags + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version: '1.23.1' + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 #v6.0.0 + with: + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.gitignore b/.gitignore index ef8d69a..4766871 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ vendor *.dylib coverage.html .glide/ +# goreleaser builds +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 9c6b8c3..c1a4348 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -49,16 +49,16 @@ changelog: sort: asc use: github groups: - - title: "✨ Features" + - title: "Features" regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' order: 0 - - title: "🐛 Bug fixes" + - title: "Bug fixes" regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' order: 1 - - title: "📚 Documentation" + - title: "Documentation" regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$' order: 2 - - title: "🌱 Others" + - title: "Others" order: 999 filters: exclude: diff --git a/RELEASE.md b/RELEASE.md index 281ae8d..bd066a8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,7 +2,6 @@ The Auger Project is released on an as-needed basis. The process is as follows: -1. An issue is proposing a new release with a changelog since the last release -1. A quorum of [OWNERS](OWNERS) must LGTM this release -1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` -1. The release issue is closed +1. Create a new git tag with `git tag -s $VERSION` +1. Push the tag with `git push $VERSION` +1. Once pushed, the [github workflow](.github/workflows/release.yaml) will automatically create a new release with the tag and changelog. \ No newline at end of file