Skip to content

feat: implement global and per-task download rate limiting #987

feat: implement global and per-task download rate limiting

feat: implement global and per-task download rate limiting #987

Workflow file for this run

name: Build and Release
on:
# Trigger 1: Auto-run on pushes to main (merges)
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test and Check (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.0"
check-latest: false
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Build
shell: bash
run: go build -v ./...
- name: Test
shell: bash
run: |
cover_arg=""
if [ "$RUNNER_OS" = "Linux" ]; then
cover_arg="-- -coverprofile=coverage.out"
fi
gotestsum --junitfile test-results.xml --format testdox $cover_arg ./...
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}
path: test-results.xml
retention-days: 7
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
if: matrix.os == 'ubuntu-latest' && success() && hashFiles('coverage.out') != ''
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.0"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: extension/package-lock.json
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}