Skip to content

fixup

fixup #39

Workflow file for this run

name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
uses: ./.github/workflows/build.yml
release-build:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache-dependency-path: go.sum
- name: Installing Dependencies
run: make deps
- name: Build release
run: make release-build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: build
github-release:
runs-on: ubuntu-latest
needs: release-build
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: build
- name: Push to github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create $(cat ./build/VERSION) \
--title $(cat ./build/VERSION) \
--notes-file ./build/CHANGELOG \
./build/release/*
- name: Update coverage badge
uses: ncruces/go-coverage-report@main
with:
report: true
chart: true
amend: true
docker-image:
runs-on: ubuntu-latest
needs: release-build
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: build
- name: Retrieve release tag to build
run: |
echo "REL_TAG=$(cat ./build/VERSION)" >> ${GITHUB_ENV}
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to docker hub and ghcr.io
env:
PLATFORM: linux/amd64,linux/arm64,linux/arm
run: |
docker context create multi-platform
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create multi-platform --platform ${{ env.PLATFORM }} --use
docker buildx build --progress plain \
-f package/container/Dockerfile --push \
--platform ${{ env.PLATFORM }} \
-t hangxie/parquet-tools:${{ env.REL_TAG }} \
-t ghcr.io/hangxie/parquet-tools:${{ env.REL_TAG }} \
.