1.0.0 #18
Workflow file for this run
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: Build Static Releases | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
build: | |
name: Build static releases | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Install xcaddy | |
run: | | |
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list | |
sudo apt update -y | |
sudo apt install -y xcaddy | |
- name: Install libvips and libvips-dev | |
run: | | |
sudo apt-get install -y libvips libvips-dev | |
- name: Build static release | |
run: | | |
CGO_ENABLED=1 xcaddy build --output ./build/caddy-image-processor --with github.com/quix-labs/caddy-image-processor=. | |
- name: Upload Release Asset | |
uses: csexton/release-asset-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
pattern: "build/*" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
release-url: ${{ steps.create_release.outputs.upload_url }} |