From 9586cde783ed734d883642a1a2cfc0beed433558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damien=20Pl=C3=A9nard?= Date: Thu, 27 Jun 2024 22:51:14 +0200 Subject: [PATCH] ci: crossbuild on Github Actions instead of CircleCI --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..be39c3e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +--- +name: Release +on: + push: + branches: + - main + - use-gha + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.6 + - uses: actions/setup-go@v5 + with: + go-version: '^1.22.2' + - run: make promu + - run: promu crossbuild -v + - name: Store binaries artifacts + uses: actions/upload-artifact@v4 + with: + name: build + path: .build + + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.6 + - name: Download binaries artifacts + uses: actions/download-artifact@v4 + with: + name: build + path: .build + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - run: make docker DOCKER_REPO=docker.io/damoun + - run: make docker-publish DOCKER_REPO=docker.io/damoun + - run: make docker-manifest DOCKER_REPO=docker.io/damoun