2022-08-27 09:22:28 +00:00
|
|
|
name: Release
|
|
|
|
|
2022-09-07 04:44:21 +00:00
|
|
|
# Uncomment the following to let goreleaser automatically
|
|
|
|
# create a GitHub release when a tag is pushed.
|
|
|
|
# permissions:
|
|
|
|
# contents: write
|
|
|
|
|
2022-08-27 09:22:28 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- '**'
|
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
|
|
|
# to be used by fork patch-releases ^^
|
|
|
|
- 'v*.*.*-*'
|
2023-02-08 03:47:11 +00:00
|
|
|
workflow_dispatch:
|
2022-08-27 09:22:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-02-08 09:31:32 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-08-27 09:22:28 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2023-02-08 09:31:32 +00:00
|
|
|
- name: dockerhub-login
|
|
|
|
uses: docker/login-action@v2
|
2022-08-27 09:22:28 +00:00
|
|
|
with:
|
2023-02-08 09:31:32 +00:00
|
|
|
username: ${{ secrets.DOCKERHUB }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_KEY }}
|
|
|
|
- name: ghcr-login
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-27 09:22:28 +00:00
|
|
|
|
|
|
|
- name: Prepare
|
|
|
|
id: prepare
|
|
|
|
run: |
|
2023-02-08 09:31:32 +00:00
|
|
|
TAG=${GITHUB_REF#refs/tags/}
|
|
|
|
echo ::set-output name=tag_name::${TAG}
|
|
|
|
|
2022-08-27 09:22:28 +00:00
|
|
|
- name: Set up QEMU
|
2023-02-08 09:31:32 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-08-27 09:22:28 +00:00
|
|
|
|
|
|
|
- name: Run GoReleaser
|
|
|
|
run: |
|
2023-02-08 09:31:32 +00:00
|
|
|
make release
|
2022-08-27 09:22:28 +00:00
|
|
|
env:
|
2022-09-07 04:44:21 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-08-27 09:22:28 +00:00
|
|
|
VERSION: ${{ steps.prepare.outputs.tag_name }}
|
|
|
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}
|
2023-02-08 09:31:32 +00:00
|
|
|
|
2023-03-03 10:11:28 +00:00
|
|
|
- name: Publish downloads
|
2023-03-06 11:47:48 +00:00
|
|
|
run: |
|
|
|
|
cd cmd/release
|
|
|
|
docker buildx build --push --platform linux/amd64 --build-arg GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" -t thorax/download:latest .
|