Skip to content

Commit

Permalink
fix(github-actions): fix release flow (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Dec 20, 2023
1 parent 33bf0b2 commit 52c6010
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/release-please.yml
Expand Up @@ -4,9 +4,16 @@ on:
push:
branches: [main]

env:
LIBAOM_VERSION: 3.8.0
LIBWEBP_VERSION: 1.3.2

jobs:
release-please:
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write

steps:
- id: generate_token
Expand All @@ -18,15 +25,14 @@ jobs:
uses: google-github-actions/release-please-action@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- if: ${{ steps.release.outputs.release_created }}
- name: Checkout
uses: actions/checkout@v4
- if: ${{ steps.release.outputs.release_created }}
name: Set up QEMU
uses: actions/setup-go@v5
with:
go-version: 1.21
- if: ${{ steps.release.outputs.release_created }}
id: meta
- id: meta
name: Docker meta
uses: docker/metadata-action@v5
with:
Expand All @@ -48,7 +54,37 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- if:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y yasm
- name: Install libwebp
run: |
mkdir -p /tmp/src
cd /tmp/src
wget -O libwebp.tar.gz https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${LIBWEBP_VERSION}.tar.gz
tar -xzf libwebp.tar.gz -C /tmp/src
rm libwebp.tar.gz
cd /tmp/src/libwebp-${LIBWEBP_VERSION}
./configure --prefix /tmp/libwebp
make -j4
make install
- name: Install libaom
run: |
mkdir -p /tmp/src
cd /tmp/src
wget -O libaom.tar.gz https://storage.googleapis.com/aom-releases/libaom-${LIBAOM_VERSION}.tar.gz
mkdir -p /tmp/src/libaom-${LIBAOM_VERSION}
tar -xzf libaom.tar.gz -C /tmp/src
rm libaom.tar.gz
mkdir -p /tmp/src/aom_build
cd /tmp/src/aom_build
cmake /tmp/src/libaom-${LIBAOM_VERSION} -DCMAKE_INSTALL_PREFIX=/tmp/libaom
make -j4
make install
- env:
CGO_CFLAGS: -I/tmp/libwebp/include -I/tmp/libaom/include
CGO_LDFLAGS: -L/tmp/libwebp/lib -lwebp -L/tmp/libaom/lib -laom -lm
name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 52c6010

Please sign in to comment.