From 6b6672ca3192c579fbf9df812cc45613c9dcedd0 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 22 Apr 2024 16:35:03 +1200 Subject: [PATCH] chore: Fixup CI --- .gitea/workflows/ci.yaml | 52 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 5483a6d..0096588 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,6 +1,12 @@ name: Gitea Actions Demo run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' jobs: Explore-Gitea-Actions: @@ -9,4 +15,46 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - run: echo "Environment vars are `env`" \ No newline at end of file + - run: echo "Environment vars are `env`" + # lint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-go@v5 + # with: + # go-version: '1.22' + # - uses: golangci/golangci-lint-action@v3 + # build: + # runs-on: ${{ matrix.os }} + # needs: lint + # strategy: + # fail-fast: true + # matrix: + # os: [macos-latest, windows-latest, ubuntu-latest] + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-go@v5 + # with: + # go-version: '1.22' + # - run: go build ./cmd/provider-gitea/ + # # - run: go test -v ./... + release: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + - run: | + mkdir -p .semrel/$(go env GOOS)_$(go env GOARCH)/providers-gitea/1.0.1/ && \ + wget https://github.com/cybercinch/go-semantic-release-provider-gitea/releases/download/v1.0.1/go-semantic-release-provider-gitea_v1.0.1_linux_amd64 \ + -O .semrel/$(go env GOOS)_$(go env GOARCH)/providers-gitea/1.0.1/gitea &&\ + chmod a+x .semrel/$(go env GOOS)_$(go env GOARCH)/providers-gitea/1.0.1/gitea + - uses: go-semantic-release/action@v1 + with: + # hooks: goreleaser + providers: gitea + env: + GITEA_TOKEN: ${{ secrets.G_TOKEN }} + GITEA_HOST: ${{ secrets.G_SERVER_URL}} \ No newline at end of file