Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Sep 24, 2024
1 parent 0c733ec commit dda9178
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# .github/workflows/release.yml

name: Release

on:
push:
tags:
- 'v*'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
test:
permissions:
checks: write
uses: ./.github/workflows/main.yml

release:
runs-on: ubuntu-latest
needs: [ test ]
permissions:
packages: write
contents: write
steps:
- id: version
run: echo "::set-output name=tag::${GITHUB_REF/refs\/tags\//}"
- id: changelog
run: echo "${{ steps.version.outputs.tag }}---$(date +'%Y-%m-%d')" | sed -e 's/\.//g' | awk '{print "::set-output name=url::https://github.com/zeiss/v8go/blob/main/CHANGELOG.md#" $1}'
- uses: softprops/action-gh-release@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
draft: true
prerelease: false
go-version-file: ./go.mod
- run: make release
if: success()
16 changes: 16 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
before:
hooks:
- go mod tidy
builds:
- skip: true
release:
header: |
## Changelog ({{ .Date }})
Welcome to this new release! We hope you enjoy the changes we've made.
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit dda9178

Please sign in to comment.