From ef0c6f2313f09f28986b1a0ab2dd5c28f7e57826 Mon Sep 17 00:00:00 2001 From: Big Duckie Date: Sun, 26 Jan 2025 13:15:40 -0700 Subject: [PATCH] Add release workflow. --- .gitea/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..7ba7078 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,31 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup go + uses: https://github.com/actions/setup-go@v4 + with: + go-version: '>=1.22.0' + - name: release-build + run: go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/edas-${{ github.ref_name }}-linux-amd64 + - name: release-build-windows + run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/edas-${{ github.ref_name }}-windows-amd64.exe + - name: release-build-darwin + run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/edas-${{ github.ref_name }}-darwin-amd64 + - name: Use Go Action + id: use-go-action + uses: https://gitea.com/actions/release-action@main + with: + files: |- + bin/** + api_key: '${{secrets.GITHUB_TOKEN}}' \ No newline at end of file