Skip to content

Docs: Simplify/modernize index page #4

Docs: Simplify/modernize index page

Docs: Simplify/modernize index page #4

name: Create new Git tag
on:
push:
branches:
- master
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
outputs:
tag_result: ${{ steps.tag.outputs.tag_result }}
steps:
- run: sudo apt update && sudo apt install -y git && git --version
- uses: actions/checkout@v2
with:
# We need entire history of tags
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./tools/go.mod
check-latest: true
cache-dependency-path: "**/*.sum"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tagging commands
id: tag
run: |
set +e
task -x tag
tag_result="$?"
echo "tag_result=$tag_result" >> $GITHUB_OUTPUT
# The range between 8 and 63 inclusive is reserved for custom
# error codes that contain specific meaning.
if [ $tag_result -lt 8 -o $tag_result -gt 63 ]; then
exit $tag_result
fi
exit 0
- name: Push tags
run: task tag.push
if: steps.tag.outputs.tag_result == 0
release:
needs: tag
if: needs.tag.outputs.tag_result == 0
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: GoReleaser
uses: goreleaser/[email protected]
with:
args: release --rm-dist
version: "<2"
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
HOMEBREW_TAP_TOKEN: ${{ secrets.GORELEASER_HOMEBREW_TAP_TOKEN }}