Skip to content

Only run dumpsource2 and protos sync on main branch #13

Only run dumpsource2 and protos sync on main branch

Only run dumpsource2 and protos sync on main branch #13

Workflow file for this run

name: Build Tools
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: build-tools
cancel-in-progress: true
jobs:
ensure-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Ensure release exists
env:
GH_TOKEN: ${{ github.token }}
run: gh release create tools --repo "$GITHUB_REPOSITORY" --title "Tools" --latest=false || true
build:
needs: ensure-release
strategy:
matrix:
include:
- os: ubuntu-latest
archive: tools-linux-x64.tar.gz
- os: windows-latest
archive: tools-win-x64.tar.gz
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
- name: Build tools
shell: bash
run: ./tools/build.sh
- name: Create archive
shell: bash
run: ./tools/archive.sh "${{ matrix.archive }}"
- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload tools --clobber tools/${{ matrix.archive }}
update-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Update release notes
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit tools --repo "$GITHUB_REPOSITORY" --notes "Automated tools build from ${GITHUB_SHA::7} on $(date -u +%Y-%m-%d)"