feat: Update go version to 1.22.5 (#53) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'build/**' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
check: | |
name: Check packages | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Brioche | |
run: | | |
mkdir -p ~/.local/bin | |
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche | |
chmod +x ~/.local/bin/brioche | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Check projects | |
run: | | |
for project in packages/*; do | |
echo "::group::$project" | |
brioche check -p "$project" | |
brioche fmt -p "$project" --check | |
echo "::endgroup::" | |
done | |
build: | |
name: Build packages | |
needs: [check] | |
if: github.repository == 'brioche-dev/brioche-packages' && github.event_name == 'push' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/build/') ) | |
runs-on: proxmox-runner-set | |
steps: | |
- name: Install system packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Brioche | |
run: | | |
mkdir -p ~/.local/bin | |
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche | |
chmod +x ~/.local/bin/brioche | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Build projects | |
run: | | |
for project in packages/*; do | |
echo "::group::$project" | |
brioche build -p "$project" --check --sync | |
echo "::endgroup::" | |
done | |
env: | |
BRIOCHE_REGISTRY_PASSWORD: ${{ secrets.BRIOCHE_REGISTRY_PASSWORD }} | |
publish: | |
name: Publish packages | |
needs: [build] | |
if: github.repository == 'brioche-dev/brioche-packages' && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Brioche | |
run: | | |
mkdir -p ~/.local/bin | |
curl -L https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche -o ~/.local/bin/brioche | |
chmod +x ~/.local/bin/brioche | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Publish projects | |
run: | | |
for project in packages/*; do | |
echo "::group::$project" | |
brioche publish -p "$project" | |
echo "::endgroup::" | |
done | |
env: | |
BRIOCHE_REGISTRY_PASSWORD: ${{ secrets.BRIOCHE_REGISTRY_PASSWORD }} |