diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 313eccb..5aa3511 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -13,12 +13,14 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: setup go + uses: https://github.com/actions/setup-go@v4 + with: + go-version: '>=1.20.1' - name: Install go-gitea/changelog run: | - wget https://github.com/go-gitea/changelog/releases/latest/download/changelog-linux-amd64 - chmod +x changelog-linux-amd64 - sudo mv changelog-linux-amd64 /usr/local/bin/changelog + go get github.com/go-gitea/changelog - name: Generate changelog id: changelog diff --git a/release b/release new file mode 100755 index 0000000..7e81158 --- /dev/null +++ b/release @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -e + +VERSION="$1" +MESSAGE="$2" + +if [ -z "$VERSION" ] || [ -z "$MESSAGE" ]; then + echo "Usage: $0 " + exit 1 +fi + +git add . +git commit -m "$MESSAGE" +git tag -a "$VERSION" -m "$VERSION" +git push +git push --tags +