diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 868b880..0000000 --- a/.drone.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: default -kind: pipeline -type: docker - -steps: - - name: fetch tags - image: alpine/git - commands: - - git fetch --tags - when: - event: - - tag - - - name: build - image: golang:1.17-alpine - commands: - - go build -v ./... - - - name: release - image: goreleaser/goreleaser - environment: - GITEA_TOKEN: - from_secret: GITEA_TOKEN - commands: - - go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest - - goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md) - when: - event: - - tag \ No newline at end of file diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..fe5baf1 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,18 @@ +name: build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.17 + + - name: Build + run: go build -v ./... \ No newline at end of file diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..cfcd837 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +on: + push: + tags: + - "*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Fetch tags + run: git fetch --force --tags + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.17 + + - name: Build + run: go build -v ./... + + - name: Release + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + go install github.com/goreleaser/goreleaser@latest + go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest + goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)