Skip to content

build(ci): pin github actions to full sha hashes #2

build(ci): pin github actions to full sha hashes

build(ci): pin github actions to full sha hashes #2

Workflow file for this run

name: release
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset: chromium-profile-syncer-linux
- os: windows-latest
asset: chromium-profile-syncer-windows.zip
- os: macos-latest
asset: chromium-profile-syncer-macos.zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Linux Qt deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libxkbcommon0 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libdbus-1-3 libfontconfig1
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.12"
- run: uv sync --all-groups
- name: Build
env:
GITHUB_SHA: ${{ github.sha }}
QT_QPA_PLATFORM: offscreen
run: uv run python build.py
- name: Package linux
if: matrix.os == 'ubuntu-latest'
run: cp dist/chromium-profile-syncer ${{ matrix.asset }}
- name: Package windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: Compress-Archive -Path dist/chromium-profile-syncer/* -DestinationPath ${{ matrix.asset }}
- name: Package macos
if: matrix.os == 'macos-latest'
run: cd dist && zip -qr ../${{ matrix.asset }} chromium-profile-syncer.app
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.asset }}
path: ${{ matrix.asset }}
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
merge-multiple: true
- name: Compute checksums
run: |
cd artifacts
for f in *; do
[ -f "$f" ] && sha256sum "$f" | awk '{print $1}' > "$f.sha256"
done
- uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
tag_name: build-${{ github.sha }}
name: build-${{ github.sha }}
target_commitish: ${{ github.sha }}
make_latest: "true"
files: artifacts/*