Skip to content

chore(main): release 2.0.2 (#5) #5

chore(main): release 2.0.2 (#5)

chore(main): release 2.0.2 (#5) #5

Workflow file for this run

name: publish
on:
push:
tags:
- 'v*.*.*'
jobs:
assets:
permissions:
contents: write
packages: write
pull-requests: read
strategy:
matrix:
target_os: ["linux", "darwin", "windows"]
target_arch: ["amd64", "arm64"]
runs-on: ubuntu-latest
env:
EARTHLY_MAX_REMOTE_CACHE: true
REMOTE_CACHE: "ghcr.io/${{ github.repository_owner }}/earthly-cache"
EARTHLY_PUSH: true
EARTHLY_CI: true
steps:
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Earthly
uses: earthly/actions-setup@v1
- name: +build ${{ matrix.target_os }}/${{ matrix.target_arch }}
run: |
export EARTHLY_REMOTE_CACHE="${{ env.REMOTE_CACHE }}:$(basename ${{ github.repository }})"
earthly -a +build/release --TARGET_OS=${{ matrix.target_os }} --TARGET_ARCH=${{ matrix.target_arch }} ./
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
files: ./release/*
docker:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
- uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true